db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r1336316 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java
Date Wed, 09 May 2012 17:49:28 GMT
Author: kristwaa
Date: Wed May  9 17:49:28 2012
New Revision: 1336316

URL: http://svn.apache.org/viewvc?rev=1336316&view=rev
Log:
DERBY-5686 (partial): Fix broken logic in BaseJDBCTestCase.assertDirectoryDeleted

Added forgotten return statement. This should make the test/setup pass if the
root directory disappears on the second or later attempt to delete all files.

Patch file: DERBY-5686-3a-add_missing_return.diff

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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java?rev=1336316&r1=1336315&r2=1336316&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java Wed
May  9 17:49:28 2012
@@ -1523,6 +1523,7 @@ public abstract class BaseJDBCTestCase
             }
             try {
                 fl = PrivilegedFileOpsForTests.persistentRecursiveDelete(dir);
+                attempts++;
             } catch (FileNotFoundException fnfe) {
                 if (attempts == 0) {
                     fail("directory doesn't exist: " +
@@ -1533,9 +1534,9 @@ public abstract class BaseJDBCTestCase
                     System.out.println("<assertDirectoryDeleted> root " +
                             "directory unexpectedly gone - delayed, " +
                             "external or concurrent delete?");
+                    return;
                 }
             }
-            finally { attempts++; }
             if (fl.length == 0) {
                 return;
             } else {



Mime
View raw message