Derby
  1. Derby
  2. DERBY-5116

SequenceTest fails with "Sequence 'MYSEQ1' already exists"

    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

      SequenceTest fails intermittently on Java 7. Seems to be dependent on the order in which the test cases run.

      Example from the nightly tests:

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

      1) test_02_DropSequence(org.apache.derbyTesting.functionTests.tests.lang.SequenceTest)java.sql.SQLException: Sequence 'MYSEQ1' already exists.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
      at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown Source)
      at org.apache.derbyTesting.functionTests.tests.lang.SequenceTest.test_02_DropSequence(SequenceTest.java:81)

      1. derby-5116-1a.diff
        0.6 kB
        Knut Anders Hatlen

        Activity

        Hide
        Knut Anders Hatlen added a comment -

        Three test cases create a sequence named MYSEQ1, but only two of them drop the sequence when they're finished.

        The attached patch makes the third test case drop the sequence too, so that the other test cases won't fail if this one happens to run first.

        Show
        Knut Anders Hatlen added a comment - Three test cases create a sequence named MYSEQ1, but only two of them drop the sequence when they're finished. The attached patch makes the third test case drop the sequence too, so that the other test cases won't fail if this one happens to run first.
        Hide
        Knut Anders Hatlen added a comment -

        Committed revision 1079775.

        Show
        Knut Anders Hatlen added a comment - Committed revision 1079775.

          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