Return-Path: X-Original-To: apmail-db-derby-commits-archive@www.apache.org Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 197A610197 for ; Thu, 11 Apr 2013 23:18:02 +0000 (UTC) Received: (qmail 78071 invoked by uid 500); 11 Apr 2013 23:18:02 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 78056 invoked by uid 500); 11 Apr 2013 23:18:02 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 78049 invoked by uid 99); 11 Apr 2013 23:18:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Apr 2013 23:18:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Apr 2013 23:17:59 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B44A92388A38; Thu, 11 Apr 2013 23:17:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1467136 - in /db/derby/code/branches/10.8: ./ java/testing/org/apache/derbyTesting/functionTests/tests/store/AutomaticIndexStatisticsTest.java Date: Thu, 11 Apr 2013 23:17:38 -0000 To: derby-commits@db.apache.org From: mikem@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130411231738.B44A92388A38@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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);