You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2011/03/08 14:12:59 UTC

[jira] Created: (DERBY-5104) InterruptResilienceTest fails to remove tables in tearDown()

InterruptResilienceTest fails to remove tables in tearDown()
------------------------------------------------------------

                 Key: DERBY-5104
                 URL: https://issues.apache.org/jira/browse/DERBY-5104
             Project: Derby
          Issue Type: Bug
          Components: Test
    Affects Versions: 10.8.0.0
            Reporter: Knut Anders Hatlen
            Assignee: Knut Anders Hatlen


If the test case testInterruptBatch runs before the other test cases in InterruptResilienceTest, the subsequent test cases will fail with errors like the following one:

6) testRAFReadWriteMultipleThreads(org.apache.derbyTesting.functionTests.tests.store.InterruptResilienceTest)java.sql.SQLException: Table/View 'T1' already exists in Schema 'APP'.
        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.store.InterruptResilienceTest.setUp(InterruptResilienceTest.java:127)

The problem appears to be that testInterruptBatch turns auto-commit off, so that BaseTestCase.tearDown() will roll back the dropping of test tables in InterruptResilienceTest.tearDown().

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (DERBY-5104) InterruptResilienceTest fails to remove tables in tearDown()

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-5104:
--------------------------------------

    Attachment: derby-5104-1a.diff

The attached patch makes tearDown() commit after dropping the test tables. This way, the call to super.tearDown() won't later roll back the cleanup if auto-commit has been turned off by the test case.

> InterruptResilienceTest fails to remove tables in tearDown()
> ------------------------------------------------------------
>
>                 Key: DERBY-5104
>                 URL: https://issues.apache.org/jira/browse/DERBY-5104
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.8.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: derby-5104-1a.diff
>
>
> If the test case testInterruptBatch runs before the other test cases in InterruptResilienceTest, the subsequent test cases will fail with errors like the following one:
> 6) testRAFReadWriteMultipleThreads(org.apache.derbyTesting.functionTests.tests.store.InterruptResilienceTest)java.sql.SQLException: Table/View 'T1' already exists in Schema 'APP'.
>         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.store.InterruptResilienceTest.setUp(InterruptResilienceTest.java:127)
> The problem appears to be that testInterruptBatch turns auto-commit off, so that BaseTestCase.tearDown() will roll back the dropping of test tables in InterruptResilienceTest.tearDown().

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Resolved: (DERBY-5104) InterruptResilienceTest fails to remove tables in tearDown()

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen resolved DERBY-5104.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.8.0.0

Committed revision 1079349.

> InterruptResilienceTest fails to remove tables in tearDown()
> ------------------------------------------------------------
>
>                 Key: DERBY-5104
>                 URL: https://issues.apache.org/jira/browse/DERBY-5104
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.8.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.8.0.0
>
>         Attachments: derby-5104-1a.diff
>
>
> If the test case testInterruptBatch runs before the other test cases in InterruptResilienceTest, the subsequent test cases will fail with errors like the following one:
> 6) testRAFReadWriteMultipleThreads(org.apache.derbyTesting.functionTests.tests.store.InterruptResilienceTest)java.sql.SQLException: Table/View 'T1' already exists in Schema 'APP'.
>         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.store.InterruptResilienceTest.setUp(InterruptResilienceTest.java:127)
> The problem appears to be that testInterruptBatch turns auto-commit off, so that BaseTestCase.tearDown() will roll back the dropping of test tables in InterruptResilienceTest.tearDown().

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira