0

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?

Mano Kugan
  • 207
  • 6
  • 23

1 Answers1

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