db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6590) Make JUnit tests run the fixtures in a deterministic order.
Date Thu, 03 Jul 2014 08:51:25 GMT

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

Knut Anders Hatlen commented on DERBY-6590:

Thanks, Dag. The changes look fine to me.

Maybe it would be better to invert the relationship between DerbyTestSuite and TestConfiguration.orderedSuite().
That is, move the implementation from orderedSuite() into DerbyTestSuite, and make orderedSuite()
return a DerbyTestSuite. The advantage is that the test cases will be added directly to the
DerbyTestSuite instance, and not wrapped in an extra TestSuite, so that we don't need hacks
to see through the wrapper, like in StatementEventsTest.

Should perhaps the new class be called BaseTestSuite instead, so that it's consistent with
BaseTestCase and BaseTestSetup?

> Make JUnit tests run the fixtures in a deterministic order.
> -----------------------------------------------------------
>                 Key: DERBY-6590
>                 URL: https://issues.apache.org/jira/browse/DERBY-6590
>             Project: Derby
>          Issue Type: Improvement
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>         Attachments: derby-6590-1.diff
> Since JDK 7, when we use the standard decorator for JUnit tests, e.g.
> return TestConfiguration.defaultSuite(AggBuiltinTest.class);
> the order in which the test fixtures get run is indeterministic. This is undesirable
because it doesn't add much coverage to the product and makes the tests more brittle than
they need to be.
> We should use TestConfiguration#orderedSuite instead.

This message was sent by Atlassian JIRA

View raw message