[
https://issues.apache.org/jira/browse/TAJO-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14700768#comment-14700768
]
ASF GitHub Bot commented on TAJO-1745:
--------------------------------------
Github user jinossy commented on the pull request:
https://github.com/apache/tajo/pull/681#issuecomment-132080379
Would you check failure?
```
TestSelectQuery.testPositives:59->QueryTestCaseBase.runNegativeTests:508->QueryTestCaseBase.getNegativeQueryFiles:852
» IO
TestSelectQuery.testNegatives:64->QueryTestCaseBase.runNegativeTests:508->QueryTestCaseBase.getNegativeQueryFiles:852
» I
Tests run: 69, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 68.622 sec
<<< FAILURE! - in org.apache.tajo.engine.query.TestSelectQuery
testPositives(org.apache.tajo.engine.query.TestSelectQuery) Time elapsed:
0.005 sec <<< ERROR!
java.io.IOException: Cannot find
file:/Users/jhkim/tajo/asf/tajo/tajo-core-tests/target/test-classes/queries/TestSelectQuery/nagative
at
org.apache.tajo.QueryTestCaseBase.getNegativeQueryFiles(QueryTestCaseBase.java:852)
at
org.apache.tajo.QueryTestCaseBase.runNegativeTests(QueryTestCaseBase.java:508)
at
org.apache.tajo.engine.query.TestSelectQuery.testPositives(TestSelectQuery.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
```
> 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)