From 1ba4dd5979d8124c19f89f2c4133617d8eb44d4d Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Tue, 5 Mar 2013 10:10:55 +0000 Subject: [PATCH] 8009259: TEST_BUG: sun/misc/Cleaner/exitOnThrow.sh failing intermittently Reviewed-by: chegar, alanb --- jdk/test/sun/misc/Cleaner/ExitOnThrow.java | 6 +----- jdk/test/sun/misc/Cleaner/exitOnThrow.sh | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/jdk/test/sun/misc/Cleaner/ExitOnThrow.java b/jdk/test/sun/misc/Cleaner/ExitOnThrow.java index 03ea83d9d45..f4fd8021748 100644 --- a/jdk/test/sun/misc/Cleaner/ExitOnThrow.java +++ b/jdk/test/sun/misc/Cleaner/ExitOnThrow.java @@ -28,21 +28,17 @@ import sun.misc.*; 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); } } diff --git a/jdk/test/sun/misc/Cleaner/exitOnThrow.sh b/jdk/test/sun/misc/Cleaner/exitOnThrow.sh index 7506ce4403f..4a22114ab18 100644 --- a/jdk/test/sun/misc/Cleaner/exitOnThrow.sh +++ b/jdk/test/sun/misc/Cleaner/exitOnThrow.sh @@ -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