< prev index next >

test/hotspot/jtreg/gc/ergonomics/TestDynamicNumberOfGCThreads.java

Print this page
rev 53507 : Fix shared tests to run without Shenandoah

@@ -27,26 +27,32 @@
  * @summary Ensure that UseDynamicNumberOfGCThreads runs
  * @requires vm.gc=="null"
  * @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 {
 
     testDynamicNumberOfGCThreads("UseConcMarkSweepGC");
 
     testDynamicNumberOfGCThreads("UseG1GC");
 
     testDynamicNumberOfGCThreads("UseParallelGC");
 
+    if (GC.Shenandoah.isSupported()) {
     testDynamicNumberOfGCThreads("UseShenandoahGC");
   }
+  }
 
   private static void verifyDynamicNumberOfGCThreads(OutputAnalyzer output) {
     output.shouldHaveExitValue(0); // test should run succesfully
     output.shouldContain("new_active_workers");
   }
< prev index next >