[
https://issues.apache.org/jira/browse/DERBY-6590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14049263#comment-14049263
]
Dag H. Wanvik commented on DERBY-6590:
--------------------------------------
I am testing out a preliminary patch using a new DerbyTestSuite class that
extends JUnit TestSuite. When using a Class argument in its constructor or in
its addTestSuite method, it would order the fixtures, e.g. in this way:
{code}
public class DerbyTestSuite extends TestSuite {
public DerbyTestSuite() {
super();
}
public DerbyTestSuite(String name) {
super(name);
}
public DerbyTestSuite(Class cls, String name) {
super(name);
super.addTest(TestConfiguration.orderedSuite(cls));
}
public DerbyTestSuite(Class cls) {
super(TestConfiguration.suiteName(cls));
super.addTest(TestConfiguration.orderedSuite(cls));
}
@Override
public void addTestSuite(Class cls) {
Test ts = TestConfiguration.orderedSuite(cls);
super.addTest(ts);
}
}
{code}
> 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
>
> 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
(v6.2#6252)