[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/passivation ...
Manik Surtani
msurtani at jboss.com
Thu Nov 2 05:13:49 EST 2006
User: msurtani
Date: 06/11/02 05:13:49
Modified: tests/functional/org/jboss/cache/passivation Tag:
Branch_JBossCache_1_4_0
ConcurrentPassivationTest.java
Log:
More consistent tmp file deletion
Revision Changes Path
No revision
No revision
1.1.2.3 +17 -3 JBossCache/tests/functional/org/jboss/cache/passivation/ConcurrentPassivationTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ConcurrentPassivationTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/passivation/ConcurrentPassivationTest.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -b -r1.1.2.2 -r1.1.2.3
--- ConcurrentPassivationTest.java 31 Oct 2006 17:35:31 -0000 1.1.2.2
+++ ConcurrentPassivationTest.java 2 Nov 2006 10:13:49 -0000 1.1.2.3
@@ -20,7 +20,7 @@
* Tests cache behavior in the presence of concurrent passivation.
*
* @author Brian Stansberry
- * @version $Revision: 1.1.2.2 $
+ * @version $Revision: 1.1.2.3 $
*/
public class ConcurrentPassivationTest extends TestCase
{
@@ -66,11 +66,25 @@
if (file.exists())
{
System.out.println("Deleting file " + file);
- file.deleteOnExit();
- System.out.println(file.delete());
+ recursivedelete(file);
}
}
+ private void recursivedelete(File f)
+ {
+ if (f.isDirectory())
+ {
+ File[] files = f.listFiles();
+ for (int i = 0; i < files.length; i++)
+ {
+ recursivedelete(files[i]);
+ }
+ }
+ //System.out.println("File " + f.toURI() + " deleted = " + f.delete());
+ f.delete();
+ }
+
+
public void testConcurrentPassivation() throws Exception
{
Fqn base = Fqn.fromString("/org/jboss/test/data/concurrent/passivation");
More information about the jboss-cvs-commits
mailing list