From ef129c21cd189757ba08345edb560eceabb16ee2 Mon Sep 17 00:00:00 2001 From: Timothy Bish Date: Tue, 24 Nov 2015 11:17:25 -0500 Subject: [PATCH] NO-JIRA ensure each test has a store with its own directory. --- .../broker/scheduler/KahaDBSchedulerIndexRebuildTest.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/scheduler/KahaDBSchedulerIndexRebuildTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/scheduler/KahaDBSchedulerIndexRebuildTest.java index 03e5c84c81..0bf8fe7328 100644 --- a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/scheduler/KahaDBSchedulerIndexRebuildTest.java +++ b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/scheduler/KahaDBSchedulerIndexRebuildTest.java @@ -39,7 +39,9 @@ import org.apache.activemq.util.IOHelper; import org.apache.activemq.util.Wait; import org.junit.After; import org.junit.Before; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.TestName; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -47,6 +49,9 @@ public class KahaDBSchedulerIndexRebuildTest { static final Logger LOG = LoggerFactory.getLogger(KahaDBSchedulerIndexRebuildTest.class); + @Rule + public TestName name = new TestName(); + private BrokerService broker = null; private final int NUM_JOBS = 50; @@ -60,11 +65,12 @@ public class KahaDBSchedulerIndexRebuildTest { } } - private final File schedulerStoreDir = new File(basedir, "activemq-data/store/scheduler"); + private File schedulerStoreDir; private final File storeDir = new File(basedir, "activemq-data/store/"); @Before public void setUp() throws Exception { + schedulerStoreDir = new File(basedir, "activemq-data/store/scheduler/" + name.getMethodName()); LOG.info("Test Dir = {}", schedulerStoreDir); }