JAVA-22043 | Fixing httpclient live test (#14352)

* JAVA-22043 | fixing httpclient live test

* JAVA-22043 | fixing httpclient live test using lambda expression for execution
This commit is contained in:
Gaetano Piazzolla
2023-07-10 20:15:49 +02:00
committed by GitHub
parent f67ef3f84f
commit 044dca1905
6 changed files with 110 additions and 113 deletions

View File

@@ -43,7 +43,7 @@ public class HttpClientLiveTest {
@Test(expected = ConnectTimeoutException.class)
public final void givenLowTimeout_whenExecutingRequestWithTimeout_thenException() throws IOException {
final RequestConfig requestConfig = RequestConfig.custom().setConnectionRequestTimeout(50).setConnectTimeout(50).setSocketTimeout(20).build();
final RequestConfig requestConfig = RequestConfig.custom().setConnectionRequestTimeout(5).setConnectTimeout(5).setSocketTimeout(2).build();
final HttpGet request = new HttpGet(SAMPLE_URL);
request.setConfig(requestConfig);
response = instance.execute(request);