--- old/test/hotspot/jtreg/gc/ergonomics/TestDynamicNumberOfGCThreads.java 2018-11-28 19:19:27.796267612 +0100 +++ new/test/hotspot/jtreg/gc/ergonomics/TestDynamicNumberOfGCThreads.java 2018-11-28 19:19:27.638268719 +0100 @@ -29,10 +29,14 @@ * @key gc * @modules java.base/jdk.internal.misc * @library /test/lib + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestDynamicNumberOfGCThreads */ import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; +import sun.hotspot.gc.GC; public class TestDynamicNumberOfGCThreads { public static void main(String[] args) throws Exception { @@ -43,7 +47,9 @@ testDynamicNumberOfGCThreads("UseParallelGC"); - testDynamicNumberOfGCThreads("UseShenandoahGC"); + if (GC.Shenandoah.isSupported()) { + testDynamicNumberOfGCThreads("UseShenandoahGC"); + } } private static void verifyDynamicNumberOfGCThreads(OutputAnalyzer output) {