Make sure all resources are disposed before try to shutdown executor
This commit is contained in:
parent
f135804b9b
commit
7dc2d8eb77
@ -105,7 +105,6 @@ public class SctpMultiStreamingEchoTest {
|
|||||||
cc.write(sctpFrame);
|
cc.write(sctpFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
while (sh.counter < sctpFrames.length) {
|
while (sh.counter < sctpFrames.length) {
|
||||||
Thread.sleep(5);
|
Thread.sleep(5);
|
||||||
}
|
}
|
||||||
@ -116,10 +115,10 @@ public class SctpMultiStreamingEchoTest {
|
|||||||
assertEquals(sctpFrames.length, sh.counter);
|
assertEquals(sctpFrames.length, sh.counter);
|
||||||
assertEquals(sctpFrames.length, ch.counter);
|
assertEquals(sctpFrames.length, ch.counter);
|
||||||
|
|
||||||
|
|
||||||
sh.channel.close().awaitUninterruptibly();
|
sh.channel.close().awaitUninterruptibly();
|
||||||
ch.channel.close().awaitUninterruptibly();
|
ch.channel.close().awaitUninterruptibly();
|
||||||
|
sc.close().awaitUninterruptibly();
|
||||||
|
|
||||||
|
|
||||||
if (sh.exception.get() != null && !(sh.exception.get() instanceof IOException)) {
|
if (sh.exception.get() != null && !(sh.exception.get() instanceof IOException)) {
|
||||||
throw sh.exception.get();
|
throw sh.exception.get();
|
||||||
|
Loading…
Reference in New Issue
Block a user