--- old/test/compiler/whitebox/BlockingCompilation.java 2016-04-08 14:17:25.054918350 +0200 +++ new/test/compiler/whitebox/BlockingCompilation.java 2016-04-08 14:17:24.926918345 +0200 @@ -28,15 +28,16 @@ * @library /testlibrary /test/lib / * @build sun.hotspot.WhiteBox * compiler.testlibrary.CompilerUtils - * @run main ClassFileInstaller sun.hotspot.WhiteBox - * sun.hotspot.WhiteBox$WhiteBoxPermission - * + * @build BlockingCompilation + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm/timeout=60 * -Xbootclasspath/a:. * -Xmixed * -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI * -XX:+PrintCompilation + * -XX:TieredCompileTaskTimeout=60000 * BlockingCompilation */ @@ -77,7 +78,13 @@ // If the compiles are blocking, this call will block until the test time out, // Progress == success // (Don't run with -Xcomp since that can cause long timeouts due to many compiles) - WB.enqueueMethodForCompilation(m, highest_level); + if (!WB.enqueueMethodForCompilation(m, highest_level)) { + throw new Exception("Failed to enqueue method on level: " + highest_level); + } + + if (!WB.isMethodQueuedForCompilation(m)) { + throw new Exception("Must be enqueued because of locked compilation"); + } // restore state WB.unlockCompilation();