Derby
  1. Derby
  2. DERBY-6073

Test ordering instability in StatementPoolingTest

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.9.1.0, 10.10.1.1
    • Fix Version/s: 10.10.1.1
    • Component/s: Test
    • Labels:
      None
    • Environment:
      Java 7, Java 8
    • Urgency:
      Normal

      Description

      StatementPoolingTest.testPoolingEnabledByCheckingImplementationDetails() assumes that the client-side statement cache will have been primed by a previous test case, testCacheOverflow(). On Java 7 and Java 8 the test order is not deterministic. If testPoolingEnabledByCheckingImplementationDetails() is the first test case to run, then it fails with this error:

      org.apache.derbyTesting.functionTests.tests.jdbcapi.StatementPoolingTest.assertClassName(StatementPoolingTest.java:147)
      at org.apache.derbyTesting.functionTests.tests.jdbcapi.StatementPoolingTest.testPoolingEnabledByCheckingImplementationDetails(StatementPoolingTest.java:89)

      I will attach a patch which forces testPoolingEnabledByCheckingImplementationDetails() to be first in the test order. With this patch, StatementPoolingTest fails for me on Java 7 when run on the 10.9 branch as well as on trunk.

      1. derby-6073-03-aa-fixConnector.diff
        10 kB
        Knut Anders Hatlen
      2. derby-6073-02-aa-java8tweak.diff
        0.9 kB
        Rick Hillegas
      3. derby-6073-01-aa-fixTestCaseOrder.diff
        7 kB
        Rick Hillegas
      4. z.diff
        8 kB
        Rick Hillegas

        Issue Links

          Activity

            People

            • Assignee:
              Rick Hillegas
              Reporter:
              Rick Hillegas
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development