test/hotspot/jtreg/runtime/appcds/GraalWithLimitedMetaspace.java
changeset 49652 a74836b05c28
parent 49372 3bb8b00832d0
child 49931 840e26123940
--- a/test/hotspot/jtreg/runtime/appcds/GraalWithLimitedMetaspace.java	Thu Mar 29 20:15:23 2018 -0700
+++ b/test/hotspot/jtreg/runtime/appcds/GraalWithLimitedMetaspace.java	Thu Mar 29 21:48:38 2018 -0700
@@ -125,8 +125,14 @@
             "-XX:MetaspaceSize=12M",
             "-XX:MaxMetaspaceSize=12M"));
 
-        OutputAnalyzer output = TestCommon.executeAndLog(pb, "dump-archive")
-            .shouldHaveExitValue(1)
-            .shouldContain("Failed allocating metaspace object type");
+        OutputAnalyzer output = TestCommon.executeAndLog(pb, "dump-archive");
+        int exitValue = output.getExitValue();
+        if (exitValue == 1) {
+            output.shouldContain("Failed allocating metaspace object type");
+        } else if (exitValue == 0) {
+            output.shouldContain("Loading classes to share");
+        } else {
+            throw new RuntimeException("Unexpected exit value " + exitValue);
+        }
     }
 }