improve fragile tests

Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
Greg Wilkins 2018-02-23 08:29:13 +11:00
parent 9805d16b39
commit c751a8b1bb
1 changed files with 1 additions and 1 deletions

View File

@ -457,10 +457,10 @@ public class SelectChannelEndPointTest
}
Assert.assertTrue(_lastEndPointLatch.await(1, TimeUnit.SECONDS));
long start = TimeUnit.NANOSECONDS.toMillis(System.nanoTime());
_lastEndPoint.setIdleTimeout(idleTimeout);
// read until idle shutdown received
long start = TimeUnit.NANOSECONDS.toMillis(System.nanoTime());
int b = client.getInputStream().read();
assertEquals(-1, b);
long idle = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()) - start;