Clear JAVA_OPTS in CLI tests; avoid permsize config error with Java 8
When a Java 8 JMV is launched with -XX:MaxPermSize a warning message is output indicating that the option will be ignored. This causes the CLI tests that assert that no error output has been produced to fail. This commit updates the CLI's integration test harness to remove JAVA_OPTS from the environment of the CLI process. This prevents any unwanted max perm size configuration from leaking into that environment and breaking the build.
This commit is contained in:
parent
57a51ed289
commit
a5e9a38b76
|
@ -57,7 +57,10 @@ public final class CommandLineInvoker {
|
|||
List<String> command = new ArrayList<String>();
|
||||
command.add(findLaunchScript().getAbsolutePath());
|
||||
command.addAll(Arrays.asList(args));
|
||||
return new ProcessBuilder(command).directory(this.workingDirectory).start();
|
||||
ProcessBuilder processBuilder = new ProcessBuilder(command)
|
||||
.directory(this.workingDirectory);
|
||||
processBuilder.environment().remove("JAVA_OPTS");
|
||||
return processBuilder.start();
|
||||
}
|
||||
|
||||
private File findLaunchScript() {
|
||||
|
|
Loading…
Reference in New Issue