8009259: TEST_BUG: sun/misc/Cleaner/exitOnThrow.sh failing intermittently
authorewang
Tue, 05 Mar 2013 10:10:55 +0000
changeset 16053 84f0b1cce029
parent 16052 60d3d3dd4880
child 16054 a7cdb40ea8e8
8009259: TEST_BUG: sun/misc/Cleaner/exitOnThrow.sh failing intermittently Reviewed-by: chegar, alanb
jdk/test/sun/misc/Cleaner/ExitOnThrow.java
jdk/test/sun/misc/Cleaner/exitOnThrow.sh
--- a/jdk/test/sun/misc/Cleaner/ExitOnThrow.java	Mon Mar 04 20:46:42 2013 -0800
+++ b/jdk/test/sun/misc/Cleaner/ExitOnThrow.java	Tue Mar 05 10:10:55 2013 +0000
@@ -28,21 +28,17 @@
 
 public class ExitOnThrow {
 
-    private static volatile boolean ran = false;
-
     public static void main(String[] args) throws Exception {
         Cleaner.create(new Object(),
                        new Runnable() {
                                public void run() {
-                                   ran = true;
                                    throw new RuntimeException("Foo!");
                                }
                            });
-        while (!ran) {
+        while (true) {
             System.gc();
             Thread.sleep(100);
         }
-        System.exit(0);
     }
 
 }
--- a/jdk/test/sun/misc/Cleaner/exitOnThrow.sh	Mon Mar 04 20:46:42 2013 -0800
+++ b/jdk/test/sun/misc/Cleaner/exitOnThrow.sh	Tue Mar 05 10:10:55 2013 +0000
@@ -25,7 +25,7 @@
 
 #
 # @test
-# @bug 4954921
+# @bug 4954921 8009259
 # @summary Ensure that if a cleaner throws an exception then the VM exits
 #
 # @build ExitOnThrow