changeset 52639:fa6e4d0216a1

8213235: java/nio/channels/SocketChannel/AsyncCloseChannel.java fails with threads that didn't exit Reviewed-by: alanb, dfuchs
author bpb
date Wed, 21 Nov 2018 08:16:25 -0800
parents f39854fffca0
children 3a7d49718852
files test/jdk/java/nio/channels/SocketChannel/AsyncCloseChannel.java
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)