Derby
  1. Derby
  2. DERBY-4908

Instability in CheckConstraintTest.testBuiltInFunctions

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.7.1.1
    • Fix Version/s: 10.7.1.1, 10.8.1.2
    • Component/s: Test
    • Labels:
      None
    • Environment:
      java version "1.6.0_20"
      Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
      Oracle JRockit(R) (build R28.0.1-21-133393-1.6.0_20-20100512-2126-linux-ia32, compiled mode)
    • Bug behavior facts:
      Regression Test Failure

      Description

      Saw this failure once when running suites.All on the 10.7.1.0 release candidate:

      1) testBuiltInFunctions(org.apache.derbyTesting.functionTests.tests.lang.CheckConstraintTest)junit.framework.AssertionFailedError: Column value mismatch @ column 'TYPE', row 1:
      Expected: >P<
      Found: >U<
      at org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:1213)
      at org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:1125)
      at org.apache.derbyTesting.junit.JDBC.assertFullResultSetMinion(JDBC.java:1012)
      at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:935)
      at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:892)
      at org.apache.derbyTesting.functionTests.tests.lang.CheckConstraintTest.testBuiltInFunctions(CheckConstraintTest.java:752)

      The failure didn't show up when I reran the test (reran both standalone and as part of suites.All).

      1. assert-unordered.diff
        0.6 kB
        Knut Anders Hatlen

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        30m 23s 1 Knut Anders Hatlen 19/Nov/10 09:21
        Gavin made changes -
        Workflow jira [ 12527292 ] Default workflow, editable Closed status [ 12801011 ]
        Rick Hillegas made changes -
        Fix Version/s 10.8.1.2 [ 12316362 ]
        Fix Version/s 10.8.1.1 [ 12316356 ]
        Rick Hillegas made changes -
        Fix Version/s 10.8.1.1 [ 12316356 ]
        Fix Version/s 10.8.1.0 [ 12315561 ]
        Rick Hillegas made changes -
        Affects Version/s 10.7.1.1 [ 12315564 ]
        Affects Version/s 10.7.1.0 [ 12314971 ]
        Knut Anders Hatlen made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Knut Anders Hatlen [ knutanders ]
        Fix Version/s 10.7.1.1 [ 12315564 ]
        Fix Version/s 10.8.0.0 [ 12315561 ]
        Resolution Fixed [ 1 ]
        Knut Anders Hatlen made changes -
        Field Original Value New Value
        Attachment assert-unordered.diff [ 12459989 ]
        Hide
        Knut Anders Hatlen added a comment -

        The attached patch switches from assertFullResultSet to assertUnorderedResultSet.

        Committed to trunk with revision 1036769.
        Committed to 10.7 with revision 1036771.

        Show
        Knut Anders Hatlen added a comment - The attached patch switches from assertFullResultSet to assertUnorderedResultSet. Committed to trunk with revision 1036769. Committed to 10.7 with revision 1036771.
        Hide
        Knut Anders Hatlen added a comment -

        The failing assert looks like this:

        rs = st.executeQuery(
        " select c.type from "
        + "sys.sysconstraints c, sys.systables t where "
        + "c.tableid = t.tableid and tablename='T1'");
        (...)
        expRS = new String [][]
        {

        {"P"}

        ,

        {"U"},
        {"C"},
        {"U"}

        ,

        {"C"}

        };

        JDBC.assertFullResultSet(rs, expRS, true);

        There's no ORDER BY clause in the query, so the failure may be caused by the the optimizer choosing a different plan for the execution. We should probably use assertUnorderedResultSet() instead of assertFullResultSet() when we check the results.

        Show
        Knut Anders Hatlen added a comment - The failing assert looks like this: rs = st.executeQuery( " select c.type from " + "sys.sysconstraints c, sys.systables t where " + "c.tableid = t.tableid and tablename='T1'"); (...) expRS = new String [][] { {"P"} , {"U"}, {"C"}, {"U"} , {"C"} }; JDBC.assertFullResultSet(rs, expRS, true); There's no ORDER BY clause in the query, so the failure may be caused by the the optimizer choosing a different plan for the execution. We should probably use assertUnorderedResultSet() instead of assertFullResultSet() when we check the results.
        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