Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/711#discussion_r38904214
--- Diff:
tajo-core-tests/src/test/java/org/apache/tajo/cli/tsql/TestTajoCli.java ---
@@ -362,6 +362,39 @@ public void testStopWhenError() throws Exception {
}
@Test
+ public void testRunWhenError() throws Exception {
+ Thread t = new Thread() {
+ public void run() {
+ try {
+ PipedOutputStream po = new PipedOutputStream();
+ InputStream is = new PipedInputStream(po);
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+ TajoConf tajoConf = new TajoConf();
+ setVar(tajoCli, SessionVars.CLI_FORMATTER_CLASS,
TajoCliOutputTestFormatter.class.getName());
+ TajoCli tc = new TajoCli(tajoConf, new String[]{}, is, out);
+
+ tc.executeMetaCommand("\\set ON_ERROR_STOP false");
+ assertSessionVar(tc, SessionVars.ON_ERROR_STOP.keyname(),
"false");
+
+ po.write(new String("asdf;\nqwe;\nzxcv;\n").getBytes());
+
+ tc.runShell();
+ } catch (Exception e) {
+ e.printStackTrace();
--- End diff --
It would be good to throw Exception properly than just printing it.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---