Skip to content
Permalink
Browse files
8274838: runtime/cds/appcds/TestSerialGCWithCDS.java fails on Windows
Reviewed-by: iklam, hseigel
  • Loading branch information
DamonFool committed Oct 7, 2021
1 parent 340c715 commit 722d639fad2e4fc6eb2aabd427e2719501899cfe
Showing 1 changed file with 8 additions and 2 deletions.
@@ -97,7 +97,8 @@ static void test(boolean dumpWithSerial, boolean execWithSerial, boolean useSmal
// a small SerialGC heap that may be too small.
String[] sizes = {
"4m", // usually this will success load the archived heap
"2m", // usually this will fail to loade th archived heap, but app can launch
"2m", // usually this will fail to load the archived heap, but app can launch
// or fail with "GC triggered before VM initialization completed"
"1m" // usually this will cause VM launch to fail with "Too small maximum heap"
};
for (String sz : sizes) {
@@ -113,7 +114,12 @@ static void test(boolean dumpWithSerial, boolean execWithSerial, boolean useSmal
if (out.getExitValue() == 0) {
out.shouldContain(HELLO);
} else {
out.shouldContain("Too small maximum heap");
String output = out.getStdout() + out.getStderr();
String exp1 = "Too small maximum heap";
String exp2 = "GC triggered before VM initialization completed";
if (!output.contains(exp1) && !output.contains(exp2)) {
throw new RuntimeException("Either '" + exp1 + "' or '" + exp2 + "' must be in stdout/stderr \n");
}
}
n++;
}

1 comment on commit 722d639

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 722d639 Oct 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.