@Test(groups = CLI, timeOut = TIMEOUT) public void shouldRunQuery() throws IOException, InterruptedException { launchPrestoCliWithServerArgument(); presto.waitForPrompt(); presto.getProcessInput().println("select * from hive.default.nation;"); assertThat(trimLines(presto.readLinesUntilPrompt())).containsAll(nationTableInteractiveLines); }
@AfterTestWithContext public void stopPresto() throws InterruptedException { if (presto != null) { presto.getProcessInput().println(EXIT_COMMAND); presto.waitForWithTimeoutAndKill(); } }