How to Add Wait in RestAssured

821 views
Skip to first unread message

skumar...@gmail.com

unread,
Nov 30, 2018, 2:54:55 PM11/30/18
to REST assured
Server can be some time slow and wont be able to respond in time; Would like to add a wait till to extract response. 

i dont want to use Thread.sleep(int). any suggestions

Michael Pinnegar

unread,
Nov 30, 2018, 6:52:18 PM11/30/18
to rest-a...@googlegroups.com
You should just increase the http timeouts of the underlying httpclient library.


On Fri, Nov 30, 2018, 2:54 PM <skumar...@gmail.com wrote:
Server can be some time slow and wont be able to respond in time; Would like to add a wait till to extract response. 

i dont want to use Thread.sleep(int). any suggestions

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Suresh Kumar

unread,
Dec 4, 2018, 5:12:28 AM12/4/18
to rest-a...@googlegroups.com
This won't work while using with POST method.

Michael Pinnegar

unread,
Dec 4, 2018, 6:41:21 AM12/4/18
to rest-a...@googlegroups.com
That doesn't sound right. Have you tried increasing the timeouts? Why would httpclient timeouts be sensitive to the http verb.

Suresh Kumar

unread,
Dec 4, 2018, 6:46:57 AM12/4/18
to rest-a...@googlegroups.com
My get method works fine but for my post I need to allow at least 20sec yo completely generate the response on server.

I tried this doesn't work .. I tried await().until() still same problem ..

Only thread.sleep(20000) is yeilding for me.
Reply all
Reply to author
Forward
0 new messages