Commit a5e9a38b authored by Andy Wilkinson's avatar Andy Wilkinson

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.
parent 57a51ed2
......@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment