db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r772534 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/IndexSplitDeadlockTest.java
Date Thu, 07 May 2009 07:52:28 GMT
Author: kahatlen
Date: Thu May  7 07:52:25 2009
New Revision: 772534

URL: http://svn.apache.org/viewvc?rev=772534&view=rev
Log:
DERBY-4218: "Table/View 'MAX_SCAN' does not exist" in IndexSplitDeadlockTest

Wait for all threads to finish before dropping tables in tearDown().

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/IndexSplitDeadlockTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/IndexSplitDeadlockTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/IndexSplitDeadlockTest.java?rev=772534&r1=772533&r2=772534&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/IndexSplitDeadlockTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/IndexSplitDeadlockTest.java
Thu May  7 07:52:25 2009
@@ -62,9 +62,9 @@
     }
 
     protected void tearDown() throws Exception {
+        // Rollback all uncommitted operations so that we don't hold any
+        // locks that may block the other threads.
         rollback();
-        setAutoCommit(false); // required by JDBC.dropSchema()
-        JDBC.dropSchema(getConnection().getMetaData(), "APP");
 
         // Go through all the threads and call waitFor() so that we
         // detect errors that happened in another thread.
@@ -74,6 +74,12 @@
         }
         threads = null;
 
+        // All the other threads have finished. Now, remove everything from
+        // the APP schema so that we don't leave anything around for subsequent
+        // tests.
+        setAutoCommit(false); // required by JDBC.dropSchema()
+        JDBC.dropSchema(getConnection().getMetaData(), "APP");
+
         super.tearDown();
     }
 



Mime
View raw message