[
https://issues.apache.org/jira/browse/TAJO-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14702455#comment-14702455
]
ASF GitHub Bot commented on TAJO-1745:
--------------------------------------
Github user jinossy commented on the pull request:
https://github.com/apache/tajo/pull/681#issuecomment-132446500
+1 LGTM
> 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)