Make sure the tests specify a request total timeout to avoid infinite waits.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
parent
a3e58c07b7
commit
c977ea1de9
|
@ -135,7 +135,9 @@ public class HttpClientIdleTimeoutTest extends AbstractTest
|
|||
Thread.sleep(2 * idleTimeout);
|
||||
|
||||
// Make sure we can make another request successfully.
|
||||
ContentResponse response2 = client.newRequest(newURI(transport)).send();
|
||||
ContentResponse response2 = client.newRequest(newURI(transport))
|
||||
.timeout(5, TimeUnit.SECONDS)
|
||||
.send();
|
||||
assertEquals(HttpStatus.OK_200, response2.getStatus());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,10 +91,11 @@ public class TrailersTest extends AbstractTest
|
|||
client.newRequest(newURI(transport))
|
||||
.trailersSupplier(() -> requestTrailers)
|
||||
.body(body)
|
||||
.timeout(5, TimeUnit.SECONDS)
|
||||
.send(listener);
|
||||
|
||||
// Write the content first, then the trailers.
|
||||
output.write(new byte[1024 * 1024]);
|
||||
output.write(new byte[128 * 1024 * 1024]);
|
||||
requestTrailers.put(trailerName, trailerValue);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue