git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1405132 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2012-11-02 19:53:30 +00:00
parent 32e009dd7b
commit cb71df57f5
1 changed files with 5 additions and 2 deletions

View File

@ -20,6 +20,7 @@ import java.io.File;
import java.io.IOException; import java.io.IOException;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.apache.kahadb.page.PageFile; import org.apache.kahadb.page.PageFile;
import org.apache.kahadb.page.Transaction; import org.apache.kahadb.page.Transaction;
import org.apache.kahadb.util.IOHelper; import org.apache.kahadb.util.IOHelper;
@ -42,7 +43,7 @@ public abstract class IndexTestSupport extends TestCase {
*/ */
protected void setUp() throws Exception { protected void setUp() throws Exception {
super.setUp(); super.setUp();
directory = new File(IOHelper.getDefaultDataDirectory()); directory = new File(IOHelper.getDefaultDataDirectory() + System.currentTimeMillis());
IOHelper.delete(directory); IOHelper.delete(directory);
} }
@ -51,6 +52,9 @@ public abstract class IndexTestSupport extends TestCase {
pf.unload(); pf.unload();
pf.delete(); pf.delete();
} }
if (directory != null) {
IOHelper.delete(directory);
}
} }
protected void createPageFileAndIndex(int pageSize) throws Exception { protected void createPageFileAndIndex(int pageSize) throws Exception {
@ -148,5 +152,4 @@ public abstract class IndexTestSupport extends TestCase {
assertNull(item); assertNull(item);
} }
} }
} }