db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dyre Tjeldvoll (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-2638) Create an option for junit tests to run only client tests
Date Mon, 14 Oct 2013 13:12:42 GMT

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

Dyre Tjeldvoll commented on DERBY-2638:
---------------------------------------

Not exactly sure what derbynetclientmats did, but one approach which I've tried out in my
sandbox is to filter out instances of ServerSetup from the tree of TestSuites returned from
a suite()-method. E.g.

{noformat}
private static TestSuite filterServerSetup(Test srcTst) {
        TestSuite serverSuite = new TestSuite();
        if (!(srcTst instanceof TestSuite)) { 
            return serverSuite;
        }
        TestSuite suite = (TestSuite) srcTst;
        int tc = suite.testCount();
        for (int i = 0; i < tc; ++i) {
            Test tx = suite.testAt(i);
            if (tx instanceof ServerSetup) {
                serverSuite.addTest(tx);
                continue;
            }
            if (tx instanceof TestSuite) {
                serverSuite.addTest(filterServerSetup(tx));
            }
        }
        return serverSuite;
    }
{noformat}

> Create an option for junit tests to run only client tests
> ---------------------------------------------------------
>
>                 Key: DERBY-2638
>                 URL: https://issues.apache.org/jira/browse/DERBY-2638
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client
>    Affects Versions: 10.3.1.4
>            Reporter: Kathey Marsden
>            Priority: Minor
>
> It used to be when making a client change, you could just run derbynetclientmats.
> It would be useful to have a junit option to run just the client tests instead of running
the full Suites.All



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message