8307411: Test java/foreign/channels/TestAsyncSocketChannels.java failed: IllegalStateException: Already closed

Reviewed-by: jvernee
This commit is contained in:
Maurizio Cimadamore 2023-05-09 11:11:15 +00:00
parent 7a3bea1f6a
commit f92d095e16

View File

@ -226,7 +226,6 @@ public class TestAsyncSocketChannels extends AbstractChannelsTest {
ioOp.accept(handler);
assertFalse(handler.isDone());
assertTrue(drop.scope().isAlive());
assertMessage(expectThrows(ISE, () -> drop.close()), "Session is acquired by");
// write to allow the blocking read complete, which will
// in turn unlock the session and allow it to be closed.
@ -275,7 +274,6 @@ public class TestAsyncSocketChannels extends AbstractChannelsTest {
// give time for socket buffer to fill up.
awaitNoFurtherWrites(bytesWritten);
assertMessage(expectThrows(ISE, () -> drop.close()), "Session is acquired by");
assertTrue(drop.scope().isAlive());
// signal handler to stop further writing