8349508: runtime/cds/appcds/TestParallelGCWithCDS.java should not check for specific output

Reviewed-by: dholmes, iklam
This commit is contained in:
Calvin Cheung 2025-02-06 22:31:19 +00:00
parent 10791477cf
commit a0c7f661be
2 changed files with 3 additions and 15 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -146,13 +146,6 @@ public class TestParallelGCWithCDS {
out.shouldContain(HELLO);
out.shouldNotContain(errMsg);
} else {
String pattern = "((Too small maximum heap)" +
"|(GC triggered before VM initialization completed)" +
"|(CDS archive has aot-linked classes but the archived heap objects cannot be loaded)" +
"|(Initial heap size set to a larger value than the maximum heap size)" +
"|(java.lang.OutOfMemoryError)" +
"|(Error: A JNI error has occurred, please check your installation and try again))";
out.shouldMatch(pattern);
out.shouldNotHaveFatalError();
}
n++;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -163,12 +163,7 @@ public class TestSerialGCWithCDS {
if (out.getExitValue() == 0) {
out.shouldNotContain(errMsg);
} else {
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");
}
out.shouldNotHaveFatalError();
}
n++;
}