db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r1467132 - in /db/derby/code/branches/10.9: ./ java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java
Date Thu, 11 Apr 2013 23:08:11 GMT
Author: mikem
Date: Thu Apr 11 23:08:10 2013
New Revision: 1467132

URL: http://svn.apache.org/r1467132
Log:
DERBY-6144 nightly regression test failure, intermittent error : testStatisticsCorrectness(org.apache.derbyTesting.functionTests.tests.store.AutomaticIndexStatisticsTest)junit.framework.A

back ported change #1467011 from trunk to 10.9 branch

test was asserting that stats had to be created after "now".  I think the
nightly was getting a case where the time was the same.  DERBY-5046 fixed
a different part to the same test to check for greater than now, so implemented
that same fix at the offending line.  Also added some text to be printed with
the variable values if it happens again.


Modified:
    db/derby/code/branches/10.9/   (props changed)
    db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java

Propchange: db/derby/code/branches/10.9/
------------------------------------------------------------------------------
  Merged /db/derby/code/trunk:r1467011

Modified: db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java?rev=1467132&r1=1467131&r2=1467132&view=diff
==============================================================================
--- db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java
(original)
+++ db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java
Thu Apr 11 23:08:10 2013
@@ -321,7 +321,14 @@ public class AutomaticIndexStatisticsTes
         for (int i=0; i < statsObj.length; i++) {
             IdxStats s = statsObj[i];
             assertEquals(rows, s.rows);
-            assertTrue(s.created.before(now));
+            
+            // DERBY-6144 
+            // Stats cannot have been created after the current time (future).
+            assertFalse(
+                "expected stat created in past:now = " + now + 
+                ";s.created = " + s.created,
+                s.created.compareTo(now) > 0);
+
             switch (s.lcols) {
                 case 1:
                     assertEquals(100, s.card);
@@ -350,7 +357,11 @@ public class AutomaticIndexStatisticsTes
                     ", previous stats created " + earlier,
                     s.created.after(earlier));
             // Stats cannot have been created after the current time (future).
-            assertFalse(s.created.compareTo(now) > 0);
+            assertFalse(
+                "expected stat created in past:now = " + now + 
+                ";s.created = " + s.created,
+                s.created.compareTo(now) > 0);
+
             switch (s.lcols) {
                 case 1:
                     assertEquals(10, s.card);



Mime
View raw message