8213235: java/nio/channels/SocketChannel/AsyncCloseChannel.java fails with threads that didn't exit
authorbpb
Wed, 21 Nov 2018 08:16:25 -0800
changeset 52639 fa6e4d0216a1
parent 52638 f39854fffca0
child 52640 3a7d49718852
8213235: java/nio/channels/SocketChannel/AsyncCloseChannel.java fails with threads that didn't exit Reviewed-by: alanb, dfuchs
test/jdk/java/nio/channels/SocketChannel/AsyncCloseChannel.java
--- a/test/jdk/java/nio/channels/SocketChannel/AsyncCloseChannel.java	Wed Nov 21 15:09:27 2018 +0000
+++ b/test/jdk/java/nio/channels/SocketChannel/AsyncCloseChannel.java	Wed Nov 21 08:16:25 2018 -0800
@@ -24,7 +24,6 @@
 /* @test
  * @bug 6285901 6501089
  * @summary Check no data is written to wrong socket channel during async closing.
- * @run main/othervm AsyncCloseChannel
  */
 
 import java.io.IOException;
@@ -112,7 +111,7 @@
                         public void run() {
                             boolean empty = true;
                             try {
-                                for(;;) {
+                                while (keepGoing) {
                                     int c = s.getInputStream().read();
                                     if(c == -1) {
                                         if(!empty)