Derby
  1. Derby
  2. DERBY-5102

GrantRevokeDDLTest depends on implicit ordering of test cases

    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

      If for example the test case testMinimumSelectPrivilegeRequirement runs before testGrantRevokeDDL2, the test will fail with the following error:

      4) testGrantRevokeDDL2(org.apache.derbyTesting.functionTests.tests.lang.GrantRevokeDDLTest)java.sql.SQLException: Schema 'USER1' already exists.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:98)
      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.executeStatement(EmbedStatement.java:1334)
      at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:630)
      at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(EmbedStatement.java:179)
      at org.apache.derbyTesting.functionTests.tests.lang.GrantRevokeDDLTest.testGrantRevokeDDL2(GrantRevokeDDLTest.java:6540)

      Or, if testRevokeDropsFKWithSharedConglom runs before testGrantRevokeDDL, the test will fail like this:

      7) testGrantRevokeDDL(org.apache.derbyTesting.functionTests.tests.lang.GrantRevokeDDLTest)junit.framework.AssertionFailedError: Column value mismatch @ column 'SCHEMANAME', row 4:
      Expected: >SATHEESH<
      Found: >MAMTA1<
      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.GrantRevokeDDLTest.testGrantRevokeDDL(GrantRevokeDDLTest.java:397)

      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.

      Seen in the nightly tests, for example here: http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/testlog/lin/1076682-suitesAll_diff.txt

      1. derby-5102-1a.diff
        0.7 kB
        Knut Anders Hatlen
      2. derby-5102-2a.diff
        1 kB
        Knut Anders Hatlen

        Activity

        Gavin made changes -
        Workflow jira [ 12601032 ] Default workflow, editable Closed status [ 12801126 ]
        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 -
        Fix Version/s 10.8.0.0 [ 12315561 ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Knut Anders Hatlen [ knutanders ]
        Knut Anders Hatlen made changes -
        Attachment derby-5102-2a.diff [ 12473388 ]
        Knut Anders Hatlen made changes -
        Field Original Value New Value
        Attachment derby-5102-1a.diff [ 12473387 ]
        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