[ 
https://issues.apache.org/jira/browse/TAJO-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14692796#comment-14692796
 ] 

ASF GitHub Bot commented on TAJO-1745:
--------------------------------------

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

    https://github.com/apache/tajo/pull/681#discussion_r36821571
  
    --- Diff: tajo-core/src/test/java/org/apache/tajo/QueryTestCaseBase.java ---
    @@ -18,6 +18,9 @@
     
     package org.apache.tajo;
     
    +import com.facebook.presto.hive.shaded.com.google.common.base.Function;
    +import 
com.facebook.presto.hive.shaded.com.google.common.collect.Collections2;
    --- End diff --
    
    Could you change to google collection?


> Add positive and negative test methods
> --------------------------------------
>
>                 Key: TAJO-1745
>                 URL: https://issues.apache.org/jira/browse/TAJO-1745
>             Project: Tajo
>          Issue Type: Sub-task
>          Components: Unit Test
>            Reporter: Hyunsik Choi
>            Assignee: Hyunsik Choi
>             Fix For: 0.11.0
>
>
> We need positive and negative tests which test just successfully completed 
> and failed without comparing the query results.
> This patch adds two methods {{runPositiveTests()}} and {{runNegativeTests()}} 
> to {{QueryTestBase}}. They run all queries included in {{query_dir/positive}} 
> and {{query_dir/negative}} in a batch manner. For example, the directory will 
> be as follows:
> {noformat}
>     src-|
>          |- resources
>                |- dataset
>                |     |- TestJoinQuery
>                |              |- table1.tbl
>                |              |- table2.tbl
>                |
>                |- queries
>                |     |- TestJoinQuery
>                |              |- positive
>                |                    |- valid_join_conditions.sql
>                |              |- negative
>                |                    |- invalid_join_conditions.sql
>                |              |- TestInnerJoin.sql
>                |              |- table1_ddl.sql
>                |              |- table2_ddl.sql
>                |
>                |- results
>                      |- TestJoinQuery
>                               |- TestInnerJoin.result
> {noformat}
> You can add the tests for them as follows:
> {code}
> @Test
>   public final void testPositives() throws Exception {
>     runNegativeTests();
>   }
>   @Test
>   public final void testNegatives() throws Exception {
>     runNegativeTests();
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to