Derby
  1. Derby
  2. DERBY-5046

Intermittent assert failure in AutomaticIndexStatisticsTest.testStatisticsCorrectness

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.8.1.2
    • Fix Version/s: 10.8.1.2
    • Component/s: Test
    • Labels:
      None
    • Bug behavior facts:
      Regression Test Failure

      Description

      An assert on timestamps in the test AutomaticIndexStatisticsTest.testStatisticsCorrectnes is unstable, and fails on sufficiently fast machines and/or operating systems with lower resolution timers.

        Issue Links

          Activity

          Hide
          Kristian Waagan added a comment -

          1) testStatisticsCorrectness(org.apache.derbyTesting.functionTests.tests.store.AutomaticIndexStatisticsTest)junit.framework.AssertionFailedError
          at org.apache.derbyTesting.functionTests.tests.store.AutomaticIndexStatisticsTest.testStatisticsCorrectness(AutomaticIndexStatisticsTest.java:346)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112)
          at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
          at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
          at junit.extensions.TestSetup.run(TestSetup.java:25)
          at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
          at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
          at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
          at junit.extensions.TestSetup.run(TestSetup.java:25)

          Show
          Kristian Waagan added a comment - 1) testStatisticsCorrectness(org.apache.derbyTesting.functionTests.tests.store.AutomaticIndexStatisticsTest)junit.framework.AssertionFailedError at org.apache.derbyTesting.functionTests.tests.store.AutomaticIndexStatisticsTest.testStatisticsCorrectness(AutomaticIndexStatisticsTest.java:346) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) at junit.extensions.TestSetup$1.protect(TestSetup.java:21) at junit.extensions.TestSetup.run(TestSetup.java:25) at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) at junit.extensions.TestSetup$1.protect(TestSetup.java:21) at junit.extensions.TestSetup.run(TestSetup.java:25)
          Hide
          Kristian Waagan added a comment -

          Attaching patch 1a, which relaxes the assert on the timestamps.

          Patch ready for review.

          Show
          Kristian Waagan added a comment - Attaching patch 1a, which relaxes the assert on the timestamps. Patch ready for review.
          Hide
          Knut Anders Hatlen added a comment -

          So the problem was that the two timestamps were identical? The patch seems to fix that problem. +1 to commit.

          Show
          Knut Anders Hatlen added a comment - So the problem was that the two timestamps were identical? The patch seems to fix that problem. +1 to commit.
          Hide
          Kristian Waagan added a comment -

          Thanks, Knut.
          Yes, the problem was identical timestamps. The existing assert demanded s.before(now) to be true.

          Committed to trunk with revision 1071348.

          Show
          Kristian Waagan added a comment - Thanks, Knut. Yes, the problem was identical timestamps. The existing assert demanded s.before(now) to be true. Committed to trunk with revision 1071348.
          Hide
          Kristian Waagan added a comment -

          Closing issue, I have seen no more reports of this error.

          Show
          Kristian Waagan added a comment - Closing issue, I have seen no more reports of this error.

            People

            • Assignee:
              Kristian Waagan
              Reporter:
              Kristian Waagan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development