Changed tests so that the data files are under the target directory

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@418437 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-07-01 04:22:58 +00:00
parent 4404311534
commit 6f9cfad67b
7 changed files with 11 additions and 11 deletions

View File

@ -40,8 +40,7 @@ public class KahaRecoveryBrokerTest extends RecoveryBrokerTest {
protected BrokerService createRestartedBroker() throws Exception {
BrokerService broker = new BrokerService();
KahaPersistentAdaptor adaptor = new KahaPersistentAdaptor(new File("activemq-data/storetest"));
KahaPersistentAdaptor adaptor = new KahaPersistentAdaptor(new File( System.getProperty("basedir", ".")+"/target/activemq-data/kaha-store.db"));
broker.setPersistenceAdapter(adaptor);
broker.addConnector("tcp://localhost:0");
return broker;

View File

@ -49,7 +49,7 @@ public class KahaXARecoveryBrokerTest extends XARecoveryBrokerTest {
protected BrokerService createRestartedBroker() throws Exception {
BrokerService broker = new BrokerService();
KahaPersistentAdaptor adaptor = new KahaPersistentAdaptor(new File("activemq-data/storetest"));
KahaPersistentAdaptor adaptor = new KahaPersistentAdaptor(new File( System.getProperty("basedir", ".")+"/target/activemq-data/kaha-store.db"));
broker.setPersistenceAdapter(adaptor);
broker.addConnector("tcp://localhost:0");
return broker;

View File

@ -10,7 +10,7 @@ import junit.framework.TestCase;
public class ListContainerTest extends TestCase{
protected String name = "test";
protected String name;
protected Store store;
protected ListContainer container;
protected LinkedList testList;
@ -291,6 +291,7 @@ public class ListContainerTest extends TestCase{
protected void setUp() throws Exception{
super.setUp();
name = System.getProperty("basedir", ".")+"/target/activemq-data/list-container.db";
StoreFactory.delete(name);
store = getStore();
store.deleteListContainer(name);

View File

@ -48,6 +48,7 @@ public class LoadTest extends TestCase{
protected void setUp() throws Exception{
super.setUp();
name = System.getProperty("basedir", ".")+"/target/activemq-data/load.db";
StoreFactory.delete(name);
store=getStore();
}

View File

@ -15,7 +15,7 @@ import junit.framework.TestCase;
public class MapContainerTest extends TestCase{
protected String name = "test";
protected String name;
protected Store store;
protected MapContainer container;
protected Map testMap;
@ -158,6 +158,7 @@ public class MapContainerTest extends TestCase{
protected void setUp() throws Exception{
super.setUp();
name = System.getProperty("basedir", ".")+"/target/activemq-data/map-container.db";
store = getStore();
store.deleteListContainer(name);
container = store.getMapContainer(name);

View File

@ -25,10 +25,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.activemq.kaha.ListContainer;
import org.apache.activemq.kaha.MapContainer;
import org.apache.activemq.kaha.Store;
import org.apache.activemq.kaha.StoreFactory;
import junit.framework.TestCase;
/**
@ -38,7 +35,7 @@ import junit.framework.TestCase;
*/
public class StoreTest extends TestCase{
protected String name = "sdbStoreTest.db";
protected String name;
protected Store store;
@ -197,6 +194,7 @@ public class StoreTest extends TestCase{
protected void setUp() throws Exception{
super.setUp();
name = System.getProperty("basedir", ".")+"/target/activemq-data/store-test.db";
store = getStore();
}

View File

@ -23,7 +23,7 @@
</transportConnectors>
<persistenceAdapter>
<kahaPersistentAdaptor dir = "activemq-data/storetest"/>
<kahaPersistentAdaptor dir = "${basedir}/target/activemq-data/kaha-broker.db"/>
</persistenceAdapter>
</broker>