8209743: [TESTBUG] java/lang/management/MemoryMXBean/LowMemoryTest2.sh fails with OutOfMemoryError running in CDS mode
authorccheung
Tue, 28 Aug 2018 16:18:58 -0700
changeset 51556 30a2c149fd7e
parent 51555 7e1f4a215b45
child 51557 0369fe9ae26f
8209743: [TESTBUG] java/lang/management/MemoryMXBean/LowMemoryTest2.sh fails with OutOfMemoryError running in CDS mode Summary: increase the MaxMetaspaceSize from 16m to 32m Reviewed-by: jiangli, iklam, mchung
test/jdk/java/lang/management/MemoryMXBean/LowMemoryTest2.sh
--- a/test/jdk/java/lang/management/MemoryMXBean/LowMemoryTest2.sh	Tue Aug 28 18:31:14 2018 -0400
+++ b/test/jdk/java/lang/management/MemoryMXBean/LowMemoryTest2.sh	Tue Aug 28 16:18:58 2018 -0700
@@ -54,12 +54,12 @@
 # Run test with each GC configuration
 #
 # Notes: To ensure that metaspace fills up we disable class unloading.
-# Also we set the max metaspace to 16MB - otherwise the test takes too
-# long to run.
+# Also we set the max metaspace to 16MB/32MB - otherwise the test takes too
+# long to run. The 32MB setting is required for running with CDS archive.
 
-go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseSerialGC LowMemoryTest2
-go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseParallelGC LowMemoryTest2
-go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseConcMarkSweepGC LowMemoryTest2
+go -noclassgc -XX:MaxMetaspaceSize=32m -XX:+UseSerialGC LowMemoryTest2
+go -noclassgc -XX:MaxMetaspaceSize=32m -XX:+UseParallelGC LowMemoryTest2
+go -noclassgc -XX:MaxMetaspaceSize=32m -XX:+UseConcMarkSweepGC LowMemoryTest2
 
 # Test class metaspace - might hit MaxMetaspaceSize instead if
 # UseCompressedClassPointers is off or if 32 bit.