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

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

Some of the test methods in this test (and also in NetworkServerControlApiTest 
- see DERBY-5115) depend on the connections having a certain connection number. 
This is only possible to guarantee if the test methods are invoked in a 
particular order, or if we restart the network server between each test method. 
I suggest that we explicitly order the methods in this test and add a comment 
saying why the order is required. I'll add a utility method that sorts the 
tests alphabetically, and then we can add a serial number to the test names to 
define the order (test_01_blahblah, test_02_blahblah, ...).

> GetCurrentPropertiesTest depends on implicit ordering of test cases
> -------------------------------------------------------------------
>
>                 Key: DERBY-5100
>                 URL: https://issues.apache.org/jira/browse/DERBY-5100
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.8.0.0
>            Reporter: Knut Anders Hatlen
>
> The test cases in GetCurrentPropertiesTest must run in the order in which 
> they are defined in the source file. If for example the test case 
> testPropertiesTraceOn runs first, the test will fail with the following stack 
> trace:
> 1) 
> testPropertiesTraceOn(org.apache.derbyTesting.functionTests.tests.derbynet.GetCurrentPropertiesTest)junit.framework.ComparisonFailure:
>  expected:<[tru]e> but was:<[fals]e>
>       at 
> org.apache.derbyTesting.functionTests.tests.derbynet.GetCurrentPropertiesTest.testPropertiesTraceOn(GetCurrentPropertiesTest.java:206)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at 
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112)
> (...)
> Seen in the nightly tests, for example here: 
> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/testlog/vista-64/1076682-suitesAll_diff.txt

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

Reply via email to