8016341: java/lang/ref/OOMEInReferenceHandler.java failing intermittently

Ensure WeakRef object can't be prematurely gc'd

Reviewed-by: chegar, plevart
This commit is contained in:
David Holmes 2013-07-09 22:01:57 -04:00
parent 411683f3a7
commit ddb13a825c

View File

@ -23,9 +23,9 @@
/**
* @test
* @bug 7038914
* @bug 7038914 8016341
* @summary Verify that the reference handler does not die after an OOME allocating the InterruptedException object
* @run main/othervm -Xmx16M -XX:-UseTLAB OOMEInReferenceHandler
* @run main/othervm -Xmx24M -XX:-UseTLAB OOMEInReferenceHandler
* @author peter.levart@gmail.com
*/
@ -107,6 +107,6 @@ public class OOMEInReferenceHandler {
}
// no sure answer after 10 seconds
throw new IllegalStateException("Reference Handler thread stuck.");
throw new IllegalStateException("Reference Handler thread stuck. weakRef.get(): " + weakRef.get());
}
}