SQL: Ignore environment in CliFixture
If the currenct environment contains `JAVA_TOOLS` then the cli tests will fail because they do not expect the notification about `JAVA_TOOLS` that java prints to stdout. The clears the environment before starting the CLI subprocess in an effort to remove the unexpected output. Original commit: elastic/x-pack-elasticsearch@5729c1c09b
This commit is contained in:
parent
c27332be4a
commit
6d56616d98
|
@ -102,6 +102,8 @@ public class CliFixture {
|
|||
command.add(cliJar.toString());
|
||||
command.addAll(Arrays.asList(line.split(" ")));
|
||||
ProcessBuilder cliBuilder = new ProcessBuilder(command);
|
||||
// Clear the environment to drop JAVA_TOOLS which prints strange things on startup
|
||||
cliBuilder.environment().clear();
|
||||
cliBuilder.redirectErrorStream(true);
|
||||
Process process = cliBuilder.start();
|
||||
println("started " + command);
|
||||
|
|
Loading…
Reference in New Issue