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 2016/12/28 07:10:58 UTC

[jira] [Commented] (DRILL-5126) Provide simplified, unified "cluster fixture" for tests

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

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

GitHub user paul-rogers opened a pull request:

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

    DRILL-5126: Provide simplified, unified "cluster fixture" for test

    Drill provides a robust selection of test frameworks that have evolved to satisfy the needs of a variety of test cases. However, some do some of what a given test needs, while others to other parts. Also, the various frameworks make assumptions (in the form of boot-time configuration) that differs from what some test may need, forcing the test to start, then stop, then restart a Drillbit - an expensive operation.
    
    Also, many ways exist to run queries, but they all do part of the job. Several ways exist to change runtime options.
    
    This checkin shamelessly grabs the best parts from existing frameworks, adds a fluent builder facade and provides a complete, versitie test framework for new tests. Old tests are unaffected by this new code.
    
    An adjustment was made to allow use of the existing TestBuilder mechanism. TestBuilder used to depend on static members of BaseTestQuery. A "shim" allows the same code to work in the old way for old tests, but with the new ClusterFixture for new tests.
    
    Details are in the org.apache.drill.test.package-info.java file.
    
    This commit modifies a single test case, TestSimpleExternalSort, to use the new framework. More cases will follow once this framework itself is committed.
    
    Also, the framework will eventually allow use of the extended mock data source from SQL. However, that change must await checkin of the mock data source changes.

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

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

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

    https://github.com/apache/drill/pull/710.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 #710
    
----
commit 1df75e40535209c74f4e8dd807ced560bbea2e50
Author: Paul Rogers <pr...@maprtech.com>
Date:   2016-12-13T21:41:23Z

    DRILL-5126: Provide simplified, unified "cluster fixture" for test
    
    Drill provides a robust selection of test frameworks that have evolved to satisfy the needs of a variety of test cases.
    However, some do some of what a given test needs, while others to other parts. Also, the various frameworks make
    assumptions (in the form of boot-time configuration) that differs from what some test may need, forcing the test
    to start, then stop, then restart a Drillbit - an expensive operation.
    
    Also, many ways exist to run queries, but they all do part of the job. Several ways exist to channge
    runtime options.
    
    This checkin shamelessly grabs the best parts from existing frameworks, adds a fluent builder facade
    and provides a complete, versitie test framework for new tests. Old tests are unaffected by this
    new code.
    
    An adjustment was made to allow use of the existing TestBuilder mechanism. TestBuilder used to
    depend on static members of BaseTestQuery. A "shim" allows the same code to work in the old
    way for old tests, but with the new ClusterFixture for new tests.
    
    Details are in the org.apache.drill.test.package-info.java file.
    
    This commit modifies a single test case, TestSimpleExternalSort, to use the new framework.
    More cases will follow once this framework itself is committed.
    
    Also, the framework will eventually allow use of the extended mock data source
    from SQL. However, that change must await checkin of the mock data source changes.

----


> Provide simplified, unified "cluster fixture" for tests
> -------------------------------------------------------
>
>                 Key: DRILL-5126
>                 URL: https://issues.apache.org/jira/browse/DRILL-5126
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Tools, Build & Test
>    Affects Versions: 1.9.0
>            Reporter: Paul Rogers
>            Assignee: Paul Rogers
>            Priority: Minor
>
> Drill provides a robust selection of test frameworks that have evolved to satisfy the needs of a variety of test cases. For newbies, however, the result is a bewildering array of ways to do basically the same thing: set up an embedded Drill cluster, run queries and check results.
> Further, some key test settings are distributed: some are in the pom.xml file, some in config files stored as resources, some in hard-coded settings in base test classes.
> Also, some test base classes helpfully set up a test cluster, but then individual tests need a different config, so they immediately tear down the default cluster and create a new one.
> This ticket proposes a new test framework, available for new tests, that combines the best of the existing test frameworks into a single, easy-to-use package.
> * Builder for the cluster
> * Accept config-time options
> * Accept run-time session and system options
> * Specify number of Drillbits
> * Simplified API for the most common options
> * AutoCloseable for use in try-with-resources statements
> * Integration with existing test builder classes
> And so on.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)