mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 12:34:32 +02:00
7123972: test/java/lang/annotation/loaderLeak/Main.java fails intermittently
Reviewed-by: dholmes, smarks
This commit is contained in:
parent
48d5be1b33
commit
b28493b31b
2 changed files with 11 additions and 6 deletions
|
@ -122,9 +122,6 @@
|
||||||
|
|
||||||
# jdk_lang
|
# jdk_lang
|
||||||
|
|
||||||
# 7123972
|
|
||||||
java/lang/annotation/loaderLeak/Main.java generic-all
|
|
||||||
|
|
||||||
# 6944188
|
# 6944188
|
||||||
java/lang/management/ThreadMXBean/ThreadStateTest.java generic-all
|
java/lang/management/ThreadMXBean/ThreadStateTest.java generic-all
|
||||||
|
|
||||||
|
|
|
@ -57,9 +57,17 @@ public class Main {
|
||||||
System.gc();
|
System.gc();
|
||||||
System.gc();
|
System.gc();
|
||||||
loader = null;
|
loader = null;
|
||||||
|
|
||||||
|
// Might require multiple calls to System.gc() for weak-references
|
||||||
|
// processing to be complete. If the weak-reference is not cleared as
|
||||||
|
// expected we will hang here until timed out by the test harness.
|
||||||
|
while (true) {
|
||||||
System.gc();
|
System.gc();
|
||||||
System.gc();
|
Thread.sleep(20);
|
||||||
if (c.get() != null) throw new AssertionError();
|
if (c.get() == null) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue