# HG changeset patch # User sjohanss # Date 1526460299 -7200 # Node ID 63f8bc358cca0e825eb3f5ffdb12ec5c7061e993 # Parent 9da00197ff729bc03d4468b5b705748002297fff 8183910: gc/arguments/TestAggressiveHeap.java fails intermittently Reviewed-by: tschatzl, kbarrett diff -r 9da00197ff72 -r 63f8bc358cca test/hotspot/jtreg/gc/arguments/TestAggressiveHeap.java --- a/test/hotspot/jtreg/gc/arguments/TestAggressiveHeap.java Wed May 16 10:24:54 2018 +0200 +++ b/test/hotspot/jtreg/gc/arguments/TestAggressiveHeap.java Wed May 16 10:44:59 2018 +0200 @@ -53,13 +53,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} {command line} private static final String parallelGCPattern = " *bool +UseParallelGC *= *true +\\{product\\} *\\{command line\\}"; 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());