Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-5101

TruncateTableTest depends on implicit ordering of test cases

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.8.1.2
    • 10.8.1.2
    • Test
    • None
    • Regression Test Failure

    Description

      If for example the test case testSelfReferencing in TruncateTableTest runs before the other test cases, the test will fail like this:

      2) testSelfReferencing(org.apache.derbyTesting.functionTests.tests.lang.TruncateTableTest)java.sql.SQLSyntaxErrorException: Schema 'ALICE' does not exist
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:92)
      at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:256)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:396)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:348)
      at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2290)
      at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:82)
      at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:619)
      at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:559)
      at org.apache.derbyTesting.functionTests.tests.lang.TruncateTableTest.testSelfReferencing(TruncateTableTest.java:167)

      The test should either make the order of the test cases explicit or make the test cases independent of the order in which they run.

      Attachments

        1. derby-5101-1a.diff
          1 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

              knutanders Knut Anders Hatlen
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: