Github user jihoonson commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/711#discussion_r38885148
  
    --- Diff: 
tajo-core-tests/src/test/java/org/apache/tajo/cli/tsql/TestTajoCli.java ---
    @@ -315,6 +315,38 @@ private void verifyStopWhenError() throws Exception {
         assertOutputResult(consoleResult);
       }
     
    +  private void verifyRunWhenError() 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 = 
TpchTestBase.getInstance().getTestingCluster().getConfiguration();
    +          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());
    +
    +          if(tc.runShell() == -1)
    +            Thread.currentThread().interrupt();
    +
    +        } catch (Exception e) {
    +          e.printStackTrace();
    +        }
    +      }
    +    };
    +
    +    t.start();
    +    Thread.sleep(5000);
    --- End diff --
    
    5 seconds seem to be too long. I think 1 second is enough.


---
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.
---

Reply via email to