I am trying to do an upload via api, when the data is small eg:100 rows the upload works fine and I get the response as expected but when the upload is large, eg:1M rows, the test fails with Time-out-exception. How can I handle this? Is Thread.sleep() a recommended method?
Asked
Active
Viewed 2,919 times
0
-
can you show your code ? – Umesh Kumar Jun 25 '19 at 06:19
1 Answers
2
You can use like this. if it is not working, please provide code.
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(5000).setConnectionRequestTimeout(5000)
.setSocketTimeout(5000).build();
HttpClientConfig httpClientFactory = HttpClientConfig.httpClientConfig()
.httpClientFactory(() -> HttpClientBuilder.create().setDefaultRequestConfig(requestConfig).build());
RestAssured.config = RestAssured.config().httpClient(httpClientFactory);

Arun Nair
- 425
- 3
- 11