Avoid that tests wait indefinitely.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
parent
343e7b2b2a
commit
5a28c7484a
|
@ -60,12 +60,14 @@ public class ValidatingConnectionPoolTest extends AbstractHttpClientServerTest
|
||||||
|
|
||||||
ContentResponse response = client.newRequest("localhost", connector.getLocalPort())
|
ContentResponse response = client.newRequest("localhost", connector.getLocalPort())
|
||||||
.scheme(scenario.getScheme())
|
.scheme(scenario.getScheme())
|
||||||
|
.timeout(5, TimeUnit.SECONDS)
|
||||||
.send();
|
.send();
|
||||||
assertEquals(200, response.getStatus());
|
assertEquals(200, response.getStatus());
|
||||||
|
|
||||||
// The second request should be sent after the validating timeout.
|
// The second request should be sent after the validating timeout.
|
||||||
response = client.newRequest("localhost", connector.getLocalPort())
|
response = client.newRequest("localhost", connector.getLocalPort())
|
||||||
.scheme(scenario.getScheme())
|
.scheme(scenario.getScheme())
|
||||||
|
.timeout(5, TimeUnit.SECONDS)
|
||||||
.send();
|
.send();
|
||||||
assertEquals(200, response.getStatus());
|
assertEquals(200, response.getStatus());
|
||||||
}
|
}
|
||||||
|
@ -100,6 +102,7 @@ public class ValidatingConnectionPoolTest extends AbstractHttpClientServerTest
|
||||||
ContentResponse response = client.newRequest("localhost", connector.getLocalPort())
|
ContentResponse response = client.newRequest("localhost", connector.getLocalPort())
|
||||||
.scheme(scenario.getScheme())
|
.scheme(scenario.getScheme())
|
||||||
.path("/redirect")
|
.path("/redirect")
|
||||||
|
.timeout(5, TimeUnit.SECONDS)
|
||||||
.send();
|
.send();
|
||||||
assertEquals(200, response.getStatus());
|
assertEquals(200, response.getStatus());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue