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 kr...@apache.org on 2012/05/09 19:49:28 UTC
svn commit: r1336316 -
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java
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 {