You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by mi...@apache.org on 2013/04/12 01:17:38 UTC
svn commit: r1467136 - in /db/derby/code/branches/10.8: ./
java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java
Author: mikem
Date: Thu Apr 11 23:17:37 2013
New Revision: 1467136
URL: http://svn.apache.org/r1467136
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.8 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.8/ (props changed)
db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java
Propchange: db/derby/code/branches/10.8/
------------------------------------------------------------------------------
Merged /db/derby/code/trunk:r1467011
Modified: db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java?rev=1467136&r1=1467135&r2=1467136&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java (original)
+++ db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java Thu Apr 11 23:17:37 2013
@@ -322,7 +322,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);
@@ -351,7 +358,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);