Derby
  1. Derby
  2. DERBY-5174

Failure in UpdateStatisticsTest after DERBY-5153

    Details

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

      Description

      I sometimes see this failure on Java 7 after DERBY-5153:

      junit.framework.AssertionFailedError: Index statistics for <ALL TABLES>
      1:

      {tableId=c0141582-012f-1ffb-f2b7-ffff8f5541b2, tableName=DERBY5153, indexName=IDX, lcols=1, rows=100, unique/card=1, created=2011-04-04 13:09:08.988}

      2:

      {tableId=c0141582-012f-1ffb-f2b7-ffff8f5541b2, tableName=DERBY5153, indexName=IDX, lcols=2, rows=100, unique/card=1, created=2011-04-04 13:09:08.988}

      3:

      {tableId=c0141582-012f-1ffb-f2b7-ffff8f5541b2, tableName=DERBY5153, indexName=IDX, lcols=3, rows=100, unique/card=1, created=2011-04-04 13:09:08.988}

      4:

      {tableId=c0141582-012f-1ffb-f2b7-ffff8f5541b2, tableName=DERBY5153, indexName=IDX, lcols=4, rows=100, unique/card=1, created=2011-04-04 13:09:08.988}

      expected:<0> but was:<4>
      at org.apache.derbyTesting.junit.IndexStatsUtil.assertStats(IndexStatsUtil.java:132)
      at org.apache.derbyTesting.junit.IndexStatsUtil.assertNoStats(IndexStatsUtil.java:109)
      at org.apache.derbyTesting.functionTests.tests.lang.UpdateStatisticsTest.testUpdateStatistics(UpdateStatisticsTest.java:93)
      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)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)

      The problem is that the test case for DERBY-5153 creates a table and doesn't drop it. testUpdateStatistics() checks the statistics for all tables in the database, and it will fail if the DERBY-5153 test case runs first (which it sometimes does on Java 7) because it finds statistics for tables it didn't expect to be there.

      1. d5174.diff
        0.5 kB
        Knut Anders Hatlen

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open In Progress In Progress
          10s 1 Knut Anders Hatlen 04/Apr/11 15:11
          In Progress In Progress Resolved Resolved
          14m 2s 1 Knut Anders Hatlen 04/Apr/11 15:25
          Resolved Resolved Closed Closed
          86d 18h 56m 1 Knut Anders Hatlen 30/Jun/11 10:21
          Gavin made changes -
          Workflow jira [ 12609555 ] Default workflow, editable Closed status [ 12801139 ]
          Knut Anders Hatlen made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Rick Hillegas made changes -
          Affects Version/s 10.8.1.2 [ 12316362 ]
          Affects Version/s 10.8.1.1 [ 12316356 ]
          Fix Version/s 10.8.1.2 [ 12316362 ]
          Fix Version/s 10.8.1.1 [ 12316356 ]
          Rick Hillegas made changes -
          Affects Version/s 10.8.1.1 [ 12316356 ]
          Affects Version/s 10.8.1.0 [ 12315561 ]
          Fix Version/s 10.8.1.1 [ 12316356 ]
          Fix Version/s 10.8.1.0 [ 12315561 ]
          Knut Anders Hatlen made changes -
          Fix Version/s 10.8.1.0 [ 12315561 ]
          Hide
          Knut Anders Hatlen added a comment -

          Merged to 10.8 and committed revision 1088646.

          Show
          Knut Anders Hatlen added a comment - Merged to 10.8 and committed revision 1088646.
          Knut Anders Hatlen made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Fix Version/s 10.9.0.0 [ 12316344 ]
          Resolution Fixed [ 1 ]
          Knut Anders Hatlen made changes -
          Attachment d5174.diff [ 12475373 ]
          Hide
          Knut Anders Hatlen added a comment -

          The test case for DERBY-5153 should drop the table it creates. The attached patch makes that change.

          Committed revision 1088633.

          Show
          Knut Anders Hatlen added a comment - The test case for DERBY-5153 should drop the table it creates. The attached patch makes that change. Committed revision 1088633.
          Knut Anders Hatlen made changes -
          Link This issue is broken by DERBY-5153 [ DERBY-5153 ]
          Knut Anders Hatlen made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          Knut Anders Hatlen created issue -

            People

            • Assignee:
              Knut Anders Hatlen
              Reporter:
              Knut Anders Hatlen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development