mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-14 12:25:21 +00:00
8009259: TEST_BUG: sun/misc/Cleaner/exitOnThrow.sh failing intermittently
Reviewed-by: chegar, alanb
This commit is contained in:
parent
16bd2e1298
commit
1ba4dd5979
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user