Sql: Consistent terminal setup for CLI

The CI tests are failing when everything works locally. It *looks*
like we are running the CLI in using autodetect mode and I expect
that Jenkins doens't *have* a terminal so It'll autodetect to
`dumb` which doesn't output encoding.

Original commit: elastic/x-pack-elasticsearch@a9075648a2
This commit is contained in:
Nik Everett 2017-09-21 17:44:56 -04:00
parent 2c183d566e
commit 3b8d8487f2
2 changed files with 7 additions and 1 deletions

View File

@ -50,7 +50,6 @@ public class Cli {
console.run();
} catch (FatalException e) {
term.writer().println(e.getMessage());
}
}
}

View File

@ -80,6 +80,13 @@ public class CliFixture {
List<String> command = new ArrayList<>();
command.add(javaExecutable.toString());
// 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");
// Disable terminal types that won't work with stdin isn't actually a tty
command.add("-Dorg.jline.terminal.jna=false");
command.add("-Dorg.jline.terminal.jansi=false");
command.add("-Dorg.jline.terminal.exec=false");
command.add("-Dorg.jline.terminal.dumb=true");
command.add("-jar");
command.add(cliJar.toString());
command.add(url);