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] Updated: (DERBY-5100) GetCurrentPropertiesTest depends on implicit ordering of test cases
Date Wed, 16 Mar 2011 17:23:30 GMT

     [ https://issues.apache.org/jira/browse/DERBY-5100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen updated DERBY-5100:
--------------------------------------

    Attachment: derby-5100-1a.diff

The attached patch adds a utility method called orderedSuite() to TestConfiguration. The method
takes a class argument and returns a test suite that runs all the test methods found in the
class in lexicographic order.

The patch also makes GetCurrentPropertiesTest use the method, and renames the test methods
in the class so that their lexicographic order is the same as the order in which they appear
in the source file.

This change made the test run reliably on Java 7 for me.

> 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
>         Attachments: derby-5100-1a.diff
>
>
> 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

Mime
View raw message