You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/08/10 10:38:45 UTC

[jira] [Commented] (TAJO-1745) Add positive and negative test methods

    [ https://issues.apache.org/jira/browse/TAJO-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14679796#comment-14679796 ] 

ASF GitHub Bot commented on TAJO-1745:
--------------------------------------

GitHub user hyunsik opened a pull request:

    https://github.com/apache/tajo/pull/681

    TAJO-1745: Add positive and negative test methods.

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/hyunsik/tajo TAJO-1745

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tajo/pull/681.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #681
    
----
commit 5f84d2fec45ef0783dd54770bf10907b85a13e2a
Author: Hyunsik Choi <hy...@apache.org>
Date:   2015-08-06T08:36:07Z

    TAJO-1745: Add positive and negative test methods.

----


> 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)