these tests were failing on windows where File.delete fails if the file is still open.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@387663 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-03-21 23:14:22 +00:00
parent 8866e28fbc
commit 261b455078
3 changed files with 14 additions and 6 deletions

View File

@ -1,15 +1,11 @@
package org.apache.activemq.kaha;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import org.apache.activemq.kaha.ListContainer;
import org.apache.activemq.kaha.Store;
import org.apache.activemq.kaha.StoreFactory;
import junit.framework.TestCase;
public class ListContainerTest extends TestCase{
@ -310,6 +306,9 @@ public class ListContainerTest extends TestCase{
protected void tearDown() throws Exception{
super.tearDown();
if( store!= null ) {
store.close();
}
assertTrue(StoreFactory.delete(name));
}
}

View File

@ -173,6 +173,10 @@ public class MapContainerTest extends TestCase{
protected void tearDown() throws Exception{
super.tearDown();
if( store != null ) {
store.close();
store=null;
}
assertTrue(StoreFactory.delete(name));
}

View File

@ -203,6 +203,11 @@ public class StoreTest extends TestCase{
protected void tearDown() throws Exception{
super.tearDown();
assertTrue(StoreFactory.delete(name));
if( store!=null ) {
store.close();
store=null;
}
boolean rc = StoreFactory.delete(name);
assertTrue(rc);
}
}