# HG changeset patch # User sjohanss # Date 1526460299 -7200 # Node ID 3c9174cba47b2d4b5ac8e91b8e641ea1ce65d32c # Parent db2a6d782f4b944bd0ed3b1acf4c4322001243af 8183910: gc/arguments/TestAggressiveHeap.java fails intermittently Reviewed-by: tschatzl, kbarrett diff -r db2a6d782f4b -r 3c9174cba47b test/gc/arguments/TestAggressiveHeap.java --- a/test/gc/arguments/TestAggressiveHeap.java Wed Dec 10 13:58:30 2014 +0000 +++ b/test/gc/arguments/TestAggressiveHeap.java Wed May 16 10:44:59 2018 +0200 @@ -51,13 +51,18 @@ // Option requires at least 256M, else error during option processing. private static final long minMemory = 256 * 1024 * 1024; + // Setting the heap to half of the physical memory is not suitable for + // a test environment with many tests running concurrently, setting to + // half of the required size instead. + private static final String heapSizeOption = "-Xmx128M"; + // bool UseParallelGC := true {product} private static final String parallelGCPattern = " *bool +UseParallelGC *:= *true +\\{product\\}"; private static void testFlag() throws Exception { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( - option, "-XX:+PrintFlagsFinal", "-version"); + option, heapSizeOption, "-XX:+PrintFlagsFinal", "-version"); OutputAnalyzer output = new OutputAnalyzer(pb.start());