8271350: runtime/Safepoint tests use OutputAnalyzer::shouldMatch instead of shouldContaint

Reviewed-by: mseledtsov, dholmes
This commit is contained in:
Igor Ignatyev 2021-07-27 23:20:19 +00:00
parent fbe28e4ee1
commit f1e15c8c8f
2 changed files with 5 additions and 5 deletions

View File

@ -74,7 +74,7 @@ public class TestAbortOnVMOperationTimeout {
if (shouldPass) { if (shouldPass) {
output.shouldHaveExitValue(0); output.shouldHaveExitValue(0);
} else { } else {
output.shouldMatch("VM operation took too long"); output.shouldContain("VM operation took too long");
output.shouldNotHaveExitValue(0); output.shouldNotHaveExitValue(0);
} }
} }

View File

@ -55,13 +55,13 @@ public class TestAbortVMOnSafepointTimeout {
); );
OutputAnalyzer output = new OutputAnalyzer(pb.start()); OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldMatch("Timed out while spinning to reach a safepoint."); output.shouldContain("Timed out while spinning to reach a safepoint.");
if (Platform.isWindows()) { if (Platform.isWindows()) {
output.shouldMatch("Safepoint sync time longer than"); output.shouldContain("Safepoint sync time longer than");
} else { } else {
output.shouldMatch("SIGILL"); output.shouldContain("SIGILL");
if (Platform.isLinux()) { if (Platform.isLinux()) {
output.shouldMatch("(sent by kill)"); output.shouldContain("(sent by kill)");
} }
} }
output.shouldNotHaveExitValue(0); output.shouldNotHaveExitValue(0);