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

    https://github.com/apache/tajo/pull/1037#discussion_r71061666
  
    --- Diff: 
tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestCreateTable.java 
---
    @@ -97,6 +98,17 @@ public final void testCreateTable2() throws Exception {
         assertDatabaseNotExists("d2");
       }
     
    +  @Test
    +  public final void testCreateTableWithCsv() throws Exception {
    +    try {
    +      executeString("CREATE TABLE D1.table1 (age int) using csv;").close();
    +      fail("It should not reach here.");
    +    } catch (Throwable e) {
    +      assertEquals(e.getClass(), SQLSyntaxError.class);
    --- End diff --
    
    How about using JUnit's Expected Exception? You can simply check the 
expected exception like in 
https://github.com/apache/tajo/blob/master/tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalogExceptions.java#L65,
 
    or do more things like described here 
https://github.com/junit-team/junit4/wiki/Exception-testing.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to