You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/03/19 03:12:42 UTC

[jira] [Commented] (DRILL-5318) Create a sub-operator test framework

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

ASF GitHub Bot commented on DRILL-5318:
---------------------------------------

GitHub user paul-rogers opened a pull request:

    https://github.com/apache/drill/pull/788

    DRILL-5318: Sub-operator test fixture

    This commit depends on:
    
    * DRILL-5319
    * DRILL-5323
    * DRILL-5324
    
    This PR cannot be accepted (or built) until the above are pulled and
    this PR is rebased on top of them. The PR is issued now so that reviews
    can be done in parallel.
    
    Provides the following:
    
    * A new OperatorFixture to set up all the objects needed to test at the
    sub-operator level. This relies on the refactoring to create the
    required interfaces.
    * Pulls the config builder code out of the cluster fixture builder so
    that configs can be build for sub-operator tests.
    * Modifies the QueryBuilder test tool to run a query and get back one
    of the new row set objects to allow direct inspection of data returned
    from a query.
    * Modifies the cluster fixture to create a JDBC connection to the test
    cluster. (Use requires putting the Drill JDBC project on the test class
    path since exec does not depend on JDBC.)

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

    $ git pull https://github.com/paul-rogers/drill DRILL-5318

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

    https://github.com/apache/drill/pull/788.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 #788
    
----
commit 279baaf3eda0bf669f76e217b1fd978f2e46f572
Author: Paul Rogers <pr...@maprtech.com>
Date:   2017-03-19T03:12:17Z

    DRILL-5318: Sub-operator test fixture
    
    This commit depends on:
    
    * DRILL-5319
    * DRILL-5323
    * DRILL-5324
    
    This PR cannot be accepted (or built) until the above are pulled and
    this PR is rebased on top of them. The PR is issued now so that reviews
    can be done in parallel.
    
    Provides the following:
    
    * A new OperatorFixture to set up all the objects needed to test at the
    sub-operator level. This relies on the refactoring to create the
    required interfaces.
    * Pulls the config builder code out of the cluster fixture builder so
    that configs can be build for sub-operator tests.
    * Modifies the QueryBuilder test tool to run a query and get back one
    of the new row set objects to allow direct inspection of data returned
    from a query.
    * Modifies the cluster fixture to create a JDBC connection to the test
    cluster. (Use requires putting the Drill JDBC project on the test class
    path since exec does not depend on JDBC.)

----


> Create a sub-operator test framework
> ------------------------------------
>
>                 Key: DRILL-5318
>                 URL: https://issues.apache.org/jira/browse/DRILL-5318
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Tools, Build & Test
>    Affects Versions: 1.11.0
>            Reporter: Paul Rogers
>            Assignee: Paul Rogers
>             Fix For: 1.11.0
>
>         Attachments: Sub-OperatorTestFramework.pdf
>
>
> Drill provides two unit test frameworks for whole-server, SQL-based testing: the original {{BaseTestQuery}} and the newer {{ClusterFixture}}. Both use the {{TestBuilder}} mechanism to build system-level functional tests that run queries and check results.
> Jason provided an operator-level test framework based, in part on mocks: 
> As Drill operators become more complex, we have a crying need for true unit-level tests at a level below the whole system and below operators. That is, we need to test the individual pieces that, together, form the operator.
> This umbrella ticket includes a number of tasks needed to create the sub-operator framework. Our intention is that, over time, as we find the need to revisit existing operators, or create new ones, we can employ the sub-operator test framework to exercise code at a finer granularity than is possible prior to this framework.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)