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

Add positive and negative test methods

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.11.0, 0.12.0
    • Unit Test
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: