diff --git a/plugin/sql/sql-cli/src/main/java/org/elasticsearch/xpack/sql/cli/Cli.java b/plugin/sql/sql-cli/src/main/java/org/elasticsearch/xpack/sql/cli/Cli.java index edf051cf928..d88eae26bec 100644 --- a/plugin/sql/sql-cli/src/main/java/org/elasticsearch/xpack/sql/cli/Cli.java +++ b/plugin/sql/sql-cli/src/main/java/org/elasticsearch/xpack/sql/cli/Cli.java @@ -81,7 +81,7 @@ public class Cli extends LoggingAwareCommand { @Override protected void execute(org.elasticsearch.cli.Terminal terminal, OptionSet options) throws Exception { - boolean debug = Boolean.parseBoolean(System.getProperty("cli.debug", "false")) || options.has("d") || options.has("debug"); + boolean debug = options.has("d") || options.has("debug"); boolean checkConnection = checkOption.value(options); List args = connectionString.values(options); if (args.size() > 1) { diff --git a/test/sql-cli-fixture/src/main/java/org/elasticsearch/xpack/sql/cli/fixture/CliFixture.java b/test/sql-cli-fixture/src/main/java/org/elasticsearch/xpack/sql/cli/fixture/CliFixture.java index c2ed5c0808e..6367804333f 100644 --- a/test/sql-cli-fixture/src/main/java/org/elasticsearch/xpack/sql/cli/fixture/CliFixture.java +++ b/test/sql-cli-fixture/src/main/java/org/elasticsearch/xpack/sql/cli/fixture/CliFixture.java @@ -89,7 +89,6 @@ public class CliFixture { } List command = new ArrayList<>(); command.add(javaExecutable.toString()); - command.add("-Dcli.debug=true"); // command.add("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000"); // Force a specific terminal type so we have consistent responses for testing. command.add("-Dorg.jline.terminal.type=xterm-256color"); @@ -100,6 +99,7 @@ public class CliFixture { command.add("-Dorg.jline.terminal.dumb=true"); command.add("-jar"); command.add(cliJar.toString()); + command.add("-d"); command.addAll(Arrays.asList(line.split(" "))); ProcessBuilder cliBuilder = new ProcessBuilder(command); // Clear the environment to drop JAVA_TOOLS which prints strange things on startup