8247353: jtreg tests minor issues clean up

Reviewed-by: herrick, almatvee
This commit is contained in:
Alexey Semenyuk 2020-06-10 20:45:28 -04:00
parent a2401333fa
commit 259662fe77
2 changed files with 3 additions and 5 deletions

View File

@ -177,6 +177,7 @@ public class AddLauncherTest {
cmd.addArguments("--module-path", modularJarCmd.getArgumentValue(
"--module-path"));
cmd.addArguments("--add-modules", modularAppDesc.moduleName());
cmd.ignoreDefaultRuntime(true); // because of --add-modules
}
new AdditionalLauncher("ModularAppLauncher")

View File

@ -227,7 +227,8 @@ public final class BasicTest {
@Parameter({ "java.desktop", "jdk.jartool" })
public void testAddModules(String... addModulesArg) {
JPackageCommand cmd = JPackageCommand
.helloAppImage("goodbye.jar:com.other/com.other.Hello");
.helloAppImage("goodbye.jar:com.other/com.other.Hello")
.ignoreDefaultRuntime(true); // because of --add-modules
Stream.of(addModulesArg).map(v -> Stream.of("--add-modules", v)).flatMap(
s -> s).forEachOrdered(cmd::addArgument);
cmd.executeAndAssertHelloAppImageCreated();
@ -270,10 +271,6 @@ public final class BasicTest {
.run(PackageTest.Action.CREATE);
createTest.get()
.addInitializer(cmd -> {
// Clean output from the previus jpackage run.
Files.delete(cmd.outputBundle());
})
// Temporary directory should not be empty,
// jpackage should exit with error.
.setExpectedExitCode(1)