From 8ab19345208cfbe87a182cad1dc3c575db9119f7 Mon Sep 17 00:00:00 2001 From: "Timothy A. Bish" Date: Thu, 13 Jun 2013 21:25:58 +0000 Subject: [PATCH] update clean plugin settings to remove more test stores. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1492874 13f79535-47bb-0310-9956-ffa450edef68 --- activemq-unit-tests/pom.xml | 3 +++ .../broker/ft/QueueMasterSlaveSingleUrlTest.java | 16 ++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/activemq-unit-tests/pom.xml b/activemq-unit-tests/pom.xml index 084e802dc3..17fa7b223d 100755 --- a/activemq-unit-tests/pom.xml +++ b/activemq-unit-tests/pom.xml @@ -442,6 +442,9 @@ ${basedir}/activemq-data + ${basedir}/KahaDB + ${basedir}/LeveDB + ${basedir}/shared diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveSingleUrlTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveSingleUrlTest.java index bcd0e08cfd..c35fbf8fab 100644 --- a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveSingleUrlTest.java +++ b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveSingleUrlTest.java @@ -35,10 +35,12 @@ public class QueueMasterSlaveSingleUrlTest extends QueueMasterSlaveTestSupport { super.setUp(); } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory(singleUriString); } + @Override protected void createMaster() throws Exception { master = new BrokerService(); master.setBrokerName("shared-master"); @@ -46,25 +48,27 @@ public class QueueMasterSlaveSingleUrlTest extends QueueMasterSlaveTestSupport { master.addConnector(brokerUrl); master.start(); } - + private void configureSharedPersistenceAdapter(BrokerService broker) throws Exception { LevelDBStore adapter = new LevelDBStore(); adapter.setDirectory(new File("shared")); - broker.setPersistenceAdapter(adapter); + broker.setPersistenceAdapter(adapter); } - protected void createSlave() throws Exception { + @Override + protected void createSlave() throws Exception { new Thread(new Runnable() { + @Override public void run() { try { BrokerService broker = new BrokerService(); broker.setBrokerName("shared-slave"); configureSharedPersistenceAdapter(broker); - // add transport as a service so that it is bound on start, after store started + // add transport as a service so that it is bound on start, after store started final TransportConnector tConnector = new TransportConnector(); tConnector.setUri(new URI(brokerUrl)); broker.addConnector(tConnector); - + broker.start(); slave.set(broker); slaveStarted.countDown(); @@ -75,5 +79,5 @@ public class QueueMasterSlaveSingleUrlTest extends QueueMasterSlaveTestSupport { }).start(); } - + }