From 0f27c464b485261711c1afdc165a59853cf51e7a Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Mon, 25 Jan 2010 18:17:17 +0000 Subject: [PATCH] speed up tests - by deleting database directly git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@902907 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java b/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java index 3051764c74..ceed5f7032 100644 --- a/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java @@ -22,6 +22,7 @@ import junit.framework.Test; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerTest; +import org.apache.activemq.util.IOHelper; /** * Once the wire format is completed we can test against real persistence storage. @@ -33,7 +34,9 @@ public class KahaDBStoreBrokerTest extends BrokerTest { protected BrokerService createBroker() throws Exception { BrokerService broker = new BrokerService(); KahaDBStore kaha = new KahaDBStore(); - kaha.setDirectory(new File("target/activemq-data/kahadb")); + File directory = new File("target/activemq-data/kahadb"); + IOHelper.deleteChildren(directory); + kaha.setDirectory(directory); kaha.deleteAllMessages(); broker.setPersistenceAdapter(kaha); return broker;