Made test more robust.

This commit is contained in:
Simone Bordet 2017-08-21 17:00:40 +02:00
parent 6cb6a9e16f
commit b9a946f76e
1 changed files with 2 additions and 2 deletions

View File

@ -694,7 +694,7 @@ public class ServerTimeoutsTest extends AbstractTest
{ {
try try
{ {
Thread.sleep(2 * idleTimeout); Thread.sleep(idleTimeout + idleTimeout / 2);
IO.copy(request.getInputStream(), response.getOutputStream()); IO.copy(request.getInputStream(), response.getOutputStream());
} }
catch (InterruptedException x) catch (InterruptedException x)
@ -729,7 +729,7 @@ public class ServerTimeoutsTest extends AbstractTest
}); });
// Wait for the server application to block reading. // Wait for the server application to block reading.
Thread.sleep(3 * idleTimeout); Thread.sleep(2 * idleTimeout);
content.offer(ByteBuffer.wrap(data2)); content.offer(ByteBuffer.wrap(data2));
content.close(); content.close();