--- old/test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/OverrideTests.java 2018-04-24 16:22:14.355249131 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/OverrideTests.java 2018-04-24 16:22:14.052220531 -0700 @@ -110,8 +110,7 @@ ); Asserts.assertTrue(compiled, TEST_MODULE + " did not compile"); - // dump the archive with jdk.comiler and jdk.incubator.httpclient classes in the class list - // with "--add-modules jdk.incubator.httpclient" + // dump the archive with jdk.compiler and java.net.http classes in the class list OutputAnalyzer output = TestCommon.dump(null /* appJar*/, TestCommon.list(ARCHIVE_CLASSES)); TestCommon.checkDump(output); // Make sure all the classes where successfully archived. @@ -168,19 +167,12 @@ // Run the test with --upgrade-module-path set to alternate location of archiveClass // The alternate version of archiveClass SHOULD be found. - CDSTestUtils.Result res = TestCommon.runWithModules( - prefix, - UPGRADEDMODS_DIR[upgradeModIdx].toString(), - MODS_DIR.toString(), - mid, - archiveClass, loaderName, "true"); // last 3 args passed to test - - output = res.getOutput(); - try { - output.shouldContain(expectedException); - } catch (Exception e) { - TestCommon.checkCommonExecExceptions(output, e); - } + TestCommon.runWithModules(prefix, + UPGRADEDMODS_DIR[upgradeModIdx].toString(), + MODS_DIR.toString(), + mid, + archiveClass, loaderName, "true") // last 3 args passed to test + .ifNoMappingFailure(out -> out.shouldContain(expectedException)); // Now run this same test again, but this time without AppCDS. Behavior should be the same. CDSOptions opts = (new CDSOptions()) @@ -200,13 +192,13 @@ // Run the test with -p set to alternate location of archiveClass. // The alternate version of archiveClass SHOULD NOT be found. - res = TestCommon.runWithModules( + TestCommon.runWithModules( prefix, null, UPGRADEDMODS_DIR[upgradeModIdx].toString() + java.io.File.pathSeparator + MODS_DIR.toString(), mid, - archiveClass, loaderName, "false"); // last 3 args passed to test - TestCommon.checkExec(res.getOutput()); + archiveClass, loaderName, "false") // last 3 args passed to test + .assertNormalExit(); // Now run this same test again, but this time without AppCDS. Behavior should be the same. opts = (new CDSOptions())