activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1405132 - /activemq/trunk/kahadb/src/test/java/org/apache/kahadb/index/IndexTestSupport.java
Date Fri, 02 Nov 2012 19:53:30 GMT
Author: tabish
Date: Fri Nov  2 19:53:30 2012
New Revision: 1405132

URL: http://svn.apache.org/viewvc?rev=1405132&view=rev
Log:
apply patch for: https://issues.apache.org/jira/browse/AMQ-4158

Modified:
    activemq/trunk/kahadb/src/test/java/org/apache/kahadb/index/IndexTestSupport.java

Modified: activemq/trunk/kahadb/src/test/java/org/apache/kahadb/index/IndexTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/kahadb/src/test/java/org/apache/kahadb/index/IndexTestSupport.java?rev=1405132&r1=1405131&r2=1405132&view=diff
==============================================================================
--- activemq/trunk/kahadb/src/test/java/org/apache/kahadb/index/IndexTestSupport.java (original)
+++ activemq/trunk/kahadb/src/test/java/org/apache/kahadb/index/IndexTestSupport.java Fri
Nov  2 19:53:30 2012
@@ -20,6 +20,7 @@ import java.io.File;
 import java.io.IOException;
 
 import junit.framework.TestCase;
+
 import org.apache.kahadb.page.PageFile;
 import org.apache.kahadb.page.Transaction;
 import org.apache.kahadb.util.IOHelper;
@@ -42,7 +43,7 @@ public abstract class IndexTestSupport e
      */
     protected void setUp() throws Exception {
         super.setUp();
-        directory = new File(IOHelper.getDefaultDataDirectory());
+        directory = new File(IOHelper.getDefaultDataDirectory() + System.currentTimeMillis());
         IOHelper.delete(directory);
     }
 
@@ -51,6 +52,9 @@ public abstract class IndexTestSupport e
             pf.unload();
             pf.delete();
         }
+        if (directory != null) {
+            IOHelper.delete(directory);
+        }
     }
 
     protected void createPageFileAndIndex(int pageSize) throws Exception {
@@ -148,5 +152,4 @@ public abstract class IndexTestSupport e
             assertNull(item);
         }
     }
-
 }



Mime
View raw message