Skip to content
Permalink
Browse files

8235563: [TESTBUG] appcds/CommandLineFlagComboNegative.java does not …

…handle archive mapping failure

Use the assertAbnormalExit method of the CDSTestUtils.Result class to handle archive mapping failure.

Reviewed-by: iklam
  • Loading branch information
calvinccheung committed Dec 18, 2019
1 parent bdaa9c6 commit fae788a20087b046fa35914d7fb105a8dfb5bda9
Showing with 8 additions and 3 deletions.
  1. +8 −3 test/hotspot/jtreg/runtime/cds/appcds/CommandLineFlagComboNegative.java
@@ -85,9 +85,14 @@ private void runTests() throws Exception

TestCommon.checkDump(dumpOutput, "Loading classes to share");

OutputAnalyzer execOutput = TestCommon.exec(appJar, testEntry.testOptionForExecuteStep, "Hello");
execOutput.shouldContain(testEntry.expectedErrorMsg);
execOutput.shouldHaveExitValue(testEntry.expectedErrorCode);
TestCommon.run(
"-cp", appJar,
testEntry.testOptionForExecuteStep,
"Hello")
.assertAbnormalExit(output -> {
output.shouldContain(testEntry.expectedErrorMsg)
.shouldHaveExitValue(testEntry.expectedErrorCode);
});
}
}

0 comments on commit fae788a

Please sign in to comment.
You can’t perform that action at this time.