Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 30756 invoked from network); 16 Mar 2011 17:23:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Mar 2011 17:23:51 -0000 Received: (qmail 16541 invoked by uid 500); 16 Mar 2011 17:23:51 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 16521 invoked by uid 500); 16 Mar 2011 17:23:51 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 16506 invoked by uid 99); 16 Mar 2011 17:23:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Mar 2011 17:23:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Mar 2011 17:23:51 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 166223AC1E2 for ; Wed, 16 Mar 2011 17:23:30 +0000 (UTC) Date: Wed, 16 Mar 2011 17:23:30 +0000 (UTC) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Message-ID: <1863552326.6970.1300296210088.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <175099925.4250.1299586979487.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Updated: (DERBY-5100) GetCurrentPropertiesTest depends on implicit ordering of test cases MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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