db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r1081568 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java
Date Mon, 14 Mar 2011 21:22:25 GMT
Author: kmarsden
Date: Mon Mar 14 21:22:24 2011
New Revision: 1081568

URL: http://svn.apache.org/viewvc?rev=1081568&view=rev
Log:
DERBY-5119 testQualifiers(org.apache.derbyTesting.functionTests.tests.store.AccessTest)java.sql.SQLException:
Table/View 'FOO' already exists in Schema 'APP'.

Add drop of table FOO to teardown method so previous failed fixtures won't leave it around
to intefere with others.


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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java?rev=1081568&r1=1081567&r2=1081568&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java
Mon Mar 14 21:22:24 2011
@@ -90,7 +90,16 @@ public final class AccessTest extends Ba
      */
     protected void tearDown() throws Exception {
         rollback();
-
+        Statement s = createStatement();
+        //DERBY-5119 Table foo is used in lots of fixtures.
+        // make sure it gets cleaned up.
+        try {
+            s.executeUpdate("DROP TABLE FOO");
+        } catch (SQLException se) {
+            // if the table couldn't drop make sure it is because it doesn't
+            // exist
+            assertSQLState("42Y55",se);
+        }
         // Clear the database properties set by this test so that they
         // don't affect other tests.
         PreparedStatement clearProp = prepareStatement(



Mime
View raw message