Description
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:
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
You can add the tests for them as follows:
@Test public final void testPositives() throws Exception { runNegativeTests(); } @Test public final void testNegatives() throws Exception { runNegativeTests(); }