You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2011/03/09 12:36:59 UTC

[jira] Created: (DERBY-5115) NetworkServerControlApiTest depends on implicit ordering of test cases

NetworkServerControlApiTest depends on implicit ordering of test cases
----------------------------------------------------------------------

                 Key: DERBY-5115
                 URL: https://issues.apache.org/jira/browse/DERBY-5115
             Project: Derby
          Issue Type: Bug
          Components: Test
    Affects Versions: 10.8.0.0
            Reporter: Knut Anders Hatlen


If the test cases in NetworkServerControlApiTest run in a different order than the order in which they appear in the source file, they may fail. Seen in the nightly regression tests on Java 7, for example here:

http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/testlog/lin/1078855-suitesAll_diff.txt

1) testTraceCommands(org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlApiTest)junit.framework.AssertionFailedError
	at org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlApiTest.testTraceCommands(NetworkServerControlApiTest.java:116)
...
2) testPropertiesAfterConnection(org.apache.derbyTesting.functionTests.tests.derbynet.GetCurrentPropertiesTest)junit.framework.ComparisonFailure: expected:<true> but was:<null>
	at org.apache.derbyTesting.functionTests.tests.derbynet.GetCurrentPropertiesTest.testPropertiesAfterConnection(GetCurrentPropertiesTest.java:170)

The test should either make the order of the test cases explicit, or make the test cases independent of each other.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Resolved: (DERBY-5115) NetworkServerControlApiTest depends on implicit ordering of test cases

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen resolved DERBY-5115.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.8.0.0

Committed revision 1082233.

> NetworkServerControlApiTest depends on implicit ordering of test cases
> ----------------------------------------------------------------------
>
>                 Key: DERBY-5115
>                 URL: https://issues.apache.org/jira/browse/DERBY-5115
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.8.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.8.0.0
>
>         Attachments: derby-5115-1a.diff
>
>
> If the test cases in NetworkServerControlApiTest run in a different order than the order in which they appear in the source file, they may fail. Seen in the nightly regression tests on Java 7, for example here:
> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/testlog/lin/1078855-suitesAll_diff.txt
> 1) testTraceCommands(org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlApiTest)junit.framework.AssertionFailedError
> 	at org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlApiTest.testTraceCommands(NetworkServerControlApiTest.java:116)
> ...
> 2) testPropertiesAfterConnection(org.apache.derbyTesting.functionTests.tests.derbynet.GetCurrentPropertiesTest)junit.framework.ComparisonFailure: expected:<true> but was:<null>
> 	at org.apache.derbyTesting.functionTests.tests.derbynet.GetCurrentPropertiesTest.testPropertiesAfterConnection(GetCurrentPropertiesTest.java:170)
> The test should either make the order of the test cases explicit, or make the test cases independent of each other.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (DERBY-5115) NetworkServerControlApiTest depends on implicit ordering of test cases

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004487#comment-13004487 ] 

Knut Anders Hatlen commented on DERBY-5115:
-------------------------------------------

The first assert failure mentioned in the bug description happens in code that looks like this:

        nsctrl.trace(true);
        nsctrl.ping();
        assertTrue(fileExists(derbySystemHome+"/Server3.trace"));
        nsctrl.trace(false);

If other test cases run before testTraceCommands, the connection number used in the ping call may not be 3, and the assert fails.

> NetworkServerControlApiTest depends on implicit ordering of test cases
> ----------------------------------------------------------------------
>
>                 Key: DERBY-5115
>                 URL: https://issues.apache.org/jira/browse/DERBY-5115
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.8.0.0
>            Reporter: Knut Anders Hatlen
>
> If the test cases in NetworkServerControlApiTest run in a different order than the order in which they appear in the source file, they may fail. Seen in the nightly regression tests on Java 7, for example here:
> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/testlog/lin/1078855-suitesAll_diff.txt
> 1) testTraceCommands(org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlApiTest)junit.framework.AssertionFailedError
> 	at org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlApiTest.testTraceCommands(NetworkServerControlApiTest.java:116)
> ...
> 2) testPropertiesAfterConnection(org.apache.derbyTesting.functionTests.tests.derbynet.GetCurrentPropertiesTest)junit.framework.ComparisonFailure: expected:<true> but was:<null>
> 	at org.apache.derbyTesting.functionTests.tests.derbynet.GetCurrentPropertiesTest.testPropertiesAfterConnection(GetCurrentPropertiesTest.java:170)
> The test should either make the order of the test cases explicit, or make the test cases independent of each other.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (DERBY-5115) NetworkServerControlApiTest depends on implicit ordering of test cases

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-5115:
--------------------------------------

    Attachment: derby-5115-1a.diff

Attaching a patch that makes the ordering of the test cases explicit, using the helper method added in DERBY-5100. Also added a comment to the test explaining why a fixed ordering is needed. This makes the test stable in my environment.

> NetworkServerControlApiTest depends on implicit ordering of test cases
> ----------------------------------------------------------------------
>
>                 Key: DERBY-5115
>                 URL: https://issues.apache.org/jira/browse/DERBY-5115
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.8.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: derby-5115-1a.diff
>
>
> If the test cases in NetworkServerControlApiTest run in a different order than the order in which they appear in the source file, they may fail. Seen in the nightly regression tests on Java 7, for example here:
> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/testlog/lin/1078855-suitesAll_diff.txt
> 1) testTraceCommands(org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlApiTest)junit.framework.AssertionFailedError
> 	at org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlApiTest.testTraceCommands(NetworkServerControlApiTest.java:116)
> ...
> 2) testPropertiesAfterConnection(org.apache.derbyTesting.functionTests.tests.derbynet.GetCurrentPropertiesTest)junit.framework.ComparisonFailure: expected:<true> but was:<null>
> 	at org.apache.derbyTesting.functionTests.tests.derbynet.GetCurrentPropertiesTest.testPropertiesAfterConnection(GetCurrentPropertiesTest.java:170)
> The test should either make the order of the test cases explicit, or make the test cases independent of each other.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Assigned: (DERBY-5115) NetworkServerControlApiTest depends on implicit ordering of test cases

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen reassigned DERBY-5115:
-----------------------------------------

    Assignee: Knut Anders Hatlen

> NetworkServerControlApiTest depends on implicit ordering of test cases
> ----------------------------------------------------------------------
>
>                 Key: DERBY-5115
>                 URL: https://issues.apache.org/jira/browse/DERBY-5115
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.8.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>
> If the test cases in NetworkServerControlApiTest run in a different order than the order in which they appear in the source file, they may fail. Seen in the nightly regression tests on Java 7, for example here:
> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/testlog/lin/1078855-suitesAll_diff.txt
> 1) testTraceCommands(org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlApiTest)junit.framework.AssertionFailedError
> 	at org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlApiTest.testTraceCommands(NetworkServerControlApiTest.java:116)
> ...
> 2) testPropertiesAfterConnection(org.apache.derbyTesting.functionTests.tests.derbynet.GetCurrentPropertiesTest)junit.framework.ComparisonFailure: expected:<true> but was:<null>
> 	at org.apache.derbyTesting.functionTests.tests.derbynet.GetCurrentPropertiesTest.testPropertiesAfterConnection(GetCurrentPropertiesTest.java:170)
> The test should either make the order of the test cases explicit, or make the test cases independent of each other.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira