You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "Hyunsik Choi (JIRA)" <ji...@apache.org> on 2015/08/19 07:09:45 UTC
[jira] [Updated] (TAJO-1745) Add positive and negative test methods
[ https://issues.apache.org/jira/browse/TAJO-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyunsik Choi updated TAJO-1745:
-------------------------------
Issue Type: Improvement (was: Sub-task)
Parent: (was: TAJO-1625)
> Add positive and negative test methods
> --------------------------------------
>
> Key: TAJO-1745
> URL: https://issues.apache.org/jira/browse/TAJO-1745
> Project: Tajo
> Issue Type: Improvement
> 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)