Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-1745

Add positive and negative test methods

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11.0, 0.12.0
    • Component/s: Unit Test
    • Labels:
      None

      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();
        }
      

        Attachments

          Activity

            People

            • Assignee:
              hyunsik Hyunsik Choi
              Reporter:
              hyunsik Hyunsik Choi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: