db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6590) Make JUnit tests run the fixtures in a deterministic order.
Date Tue, 01 Jul 2014 20:18:24 GMT

    [ 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:
public class DerbyTestSuite extends TestSuite {
    public DerbyTestSuite() {
    public DerbyTestSuite(String name) {
    public DerbyTestSuite(Class cls, String name) {

    public DerbyTestSuite(Class cls) {

    public void addTestSuite(Class cls) {
        Test ts = TestConfiguration.orderedSuite(cls);

> 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

View raw message