db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1404886 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java
Date Fri, 02 Nov 2012 07:31:14 GMT
Author: kahatlen
Date: Fri Nov  2 07:31:14 2012
New Revision: 1404886

URL: http://svn.apache.org/viewvc?rev=1404886&view=rev
Log:
DERBY-5964: Timestamp comparison failure in AutomaticIndexStatisticsTest.testStatisticsCorrectness

Run test in GMT timezone to prevent instabilities around transition
to or from DST.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java?rev=1404886&r1=1404885&r2=1404886&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java
Fri Nov  2 07:31:14 2012
@@ -44,6 +44,7 @@ import org.apache.derbyTesting.junit.Ind
 import org.apache.derbyTesting.junit.JDBC;
 import org.apache.derbyTesting.junit.JDBCDataSource;
 import org.apache.derbyTesting.junit.TestConfiguration;
+import org.apache.derbyTesting.junit.TimeZoneTestSetup;
 import org.apache.derbyTesting.junit.Utilities;
 
 /**
@@ -75,7 +76,14 @@ public class AutomaticIndexStatisticsTes
 
     public static Test suite() {
         TestSuite suite = new TestSuite(AutomaticIndexStatisticsTest.class);
-        return TestConfiguration.additionalDatabaseDecorator(suite, MASTERDB);
+        // DERBY-5964: The test needs to check the timestamp stored in
+        // SYSSTATISTICS, which is in the local timezone. Since those
+        // timestamps may be ambiguous around the transition to or from DST,
+        // run this test in a timezone that doesn't observe DST. The
+        // TimeZoneTestSetup can probably be removed once DERBY-5974 is fixed.
+        return new TimeZoneTestSetup(
+                TestConfiguration.additionalDatabaseDecorator(suite, MASTERDB),
+                "GMT");
     }
 
     /** Initialize the default statistics helper object. */



Mime
View raw message