8016341: java/lang/ref/OOMEInReferenceHandler.java failing intermittently
authordholmes
Tue, 09 Jul 2013 22:01:57 -0400
changeset 18792 dbac92e2a5e8
parent 18791 1973449fc9d9
child 18793 4d9455e24050
8016341: java/lang/ref/OOMEInReferenceHandler.java failing intermittently Summary: Ensure WeakRef object can't be prematurely gc'd Reviewed-by: chegar, plevart
jdk/test/java/lang/ref/OOMEInReferenceHandler.java
--- a/jdk/test/java/lang/ref/OOMEInReferenceHandler.java	Tue Jul 09 16:00:41 2013 +0100
+++ b/jdk/test/java/lang/ref/OOMEInReferenceHandler.java	Tue Jul 09 22:01:57 2013 -0400
@@ -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 @@
          }
 
          // no sure answer after 10 seconds
-         throw new IllegalStateException("Reference Handler thread stuck.");
+         throw new IllegalStateException("Reference Handler thread stuck. weakRef.get(): " + weakRef.get());
      }
 }