< prev index next >

test/hotspot/jtreg/gc/shenandoah/options/TestHumongousThresholdArgs.java

Print this page
rev 59823 : 8247751: Shenandoah: options tests should run with smaller heaps
Reviewed-by: XXX

@@ -36,31 +36,37 @@
 import jdk.test.lib.process.OutputAnalyzer;
 
 public class TestHumongousThresholdArgs {
     public static void main(String[] args) throws Exception {
         {
-            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockExperimentalVMOptions",
+            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+                    "-Xmx128m",
+                    "-XX:+UnlockExperimentalVMOptions",
                     "-XX:+UseShenandoahGC",
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
             output.shouldHaveExitValue(0);
         }
 
         int[] valid = new int[] {1, 10, 50, 90, 100};
         int[] invalid = new int[] {-100, -1, 0, 101, 1000};
 
         for (int v : valid) {
-            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockExperimentalVMOptions",
+            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+                    "-Xmx128m",
+                    "-XX:+UnlockExperimentalVMOptions",
                     "-XX:+UseShenandoahGC",
                     "-XX:ShenandoahHumongousThreshold=" + v,
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
             output.shouldHaveExitValue(0);
         }
 
         for (int v : invalid) {
-            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockExperimentalVMOptions",
+            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+                    "-Xmx128m",
+                    "-XX:+UnlockExperimentalVMOptions",
                     "-XX:+UseShenandoahGC",
                     "-XX:ShenandoahHumongousThreshold=" + v,
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
             output.shouldHaveExitValue(1);
< prev index next >