# HG changeset patch # User ccheung # Date 1535498338 25200 # Node ID 30a2c149fd7e68d011cab54b70584238b3ecad20 # Parent 7e1f4a215b4506cfe8a1d722c68f0f05b9ea3aa5 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 diff -r 7e1f4a215b45 -r 30a2c149fd7e 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.