More precise shutdown time test
This commit is contained in:
parent
c979563dcd
commit
5c494dd045
@ -65,7 +65,7 @@ public class NioClientSocketShutdownTimeTest {
|
|||||||
ClientBootstrap b = new ClientBootstrap(new NioClientSocketChannelFactory(e1, e2));
|
ClientBootstrap b = new ClientBootstrap(new NioClientSocketChannelFactory(e1, e2));
|
||||||
b.getPipeline().addLast("handler", new DummyHandler());
|
b.getPipeline().addLast("handler", new DummyHandler());
|
||||||
|
|
||||||
long startTime = System.currentTimeMillis();
|
long startTime;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
serverSocket.configureBlocking(false);
|
serverSocket.configureBlocking(false);
|
||||||
@ -82,6 +82,8 @@ public class NioClientSocketShutdownTimeTest {
|
|||||||
}
|
}
|
||||||
assertTrue(f.isSuccess());
|
assertTrue(f.isSuccess());
|
||||||
|
|
||||||
|
startTime = System.currentTimeMillis();
|
||||||
|
|
||||||
f.getChannel().close().awaitUninterruptibly();
|
f.getChannel().close().awaitUninterruptibly();
|
||||||
} finally {
|
} finally {
|
||||||
assertEquals(0, e1.shutdownNow().size());
|
assertEquals(0, e1.shutdownNow().size());
|
||||||
|
Loading…
Reference in New Issue
Block a user