You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by dj...@apache.org on 2007/01/26 05:34:44 UTC

svn commit: r500142 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DropDatabaseSetup.java

Author: djd
Date: Thu Jan 25 20:34:44 2007
New Revision: 500142

URL: http://svn.apache.org/viewvc?view=rev&rev=500142
Log:
Fix DropDatabaseSetup to work even if the database was never created.
Previously an assert would fail if the database did not exist at tearDown time.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DropDatabaseSetup.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DropDatabaseSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DropDatabaseSetup.java?view=diff&rev=500142&r1=500141&r2=500142
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DropDatabaseSetup.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DropDatabaseSetup.java Thu Jan 25 20:34:44 2007
@@ -76,6 +76,11 @@
     }
 
     private static void removeDir(File dir) {
+        
+        // Check if anything to do!
+        // Database may not have been created.
+        if (!dir.exists())
+            return;
 
         String[] list = dir.list();