Derby
  1. Derby
  2. DERBY-5106

Lacking cleanup in CheckConstraintTest.testJira4282()

    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
    • Component/s: Test
    • Labels:
      None
    • Bug behavior facts:
      Regression Test Failure

      Description

      The test case testJira4282 in CheckConstraintTest doesn't drop the table it creates. The table itself has a unique name that doesn't conflict with any other test case, but it also has a constraint with a generic name (CK1) that is in conflict with constraints created in testCheckConstraints and testPositionalUpdate. If testJira4282 runs before any of those test cases, the test will fail.

      Example from the nightly tests:

      http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/testlog/lin/1076682-suitesAll_diff.txt

      1) testCheckConstraints(org.apache.derbyTesting.functionTests.tests.lang.CheckConstraintTest)java.sql.SQLException: Constraint 'CK1' already exists in Schema 'APP'.
      at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
      at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
      at org.apache.derby.client.am.Statement.executeUpdate(Unknown Source)
      at org.apache.derbyTesting.functionTests.tests.lang.CheckConstraintTest.testCheckConstraints(CheckConstraintTest.java:243)

      1. derby-5106-1a.diff
        0.7 kB
        Knut Anders Hatlen

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        12s 1 Knut Anders Hatlen 08/Mar/11 15:59
        In Progress In Progress Resolved Resolved
        3m 20s 1 Knut Anders Hatlen 08/Mar/11 16:02
        Resolved Resolved Closed Closed
        113d 17h 19m 1 Knut Anders Hatlen 30/Jun/11 10:21
        Gavin made changes -
        Workflow jira [ 12601053 ] Default workflow, editable Closed status [ 12801133 ]
        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 -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Fix Version/s 10.8.0.0 [ 12315561 ]
        Resolution Fixed [ 1 ]
        Hide
        Knut Anders Hatlen added a comment -

        Committed revision 1079406.

        Show
        Knut Anders Hatlen added a comment - Committed revision 1079406.
        Knut Anders Hatlen made changes -
        Attachment derby-5106-1a.diff [ 12472971 ]
        Hide
        Knut Anders Hatlen added a comment -

        Attaching a patch that makes testJira4282 drop the table when it's done.

        Show
        Knut Anders Hatlen added a comment - Attaching a patch that makes testJira4282 drop the table when it's done.
        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