From ba78db89a3d1c9a1d23a7efb1ae536e8cb257d1e Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Fri, 17 Sep 2010 08:29:08 +0000 Subject: [PATCH] test that did not stop broker in teardown, schedualer db lock on startup shows it: https://issues.apache.org/activemq/browse/AMQ-2897 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@998015 13f79535-47bb-0310-9956-ffa450edef68 --- .../broker/ft/MasterSlaveProducerFlowControlTest.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveProducerFlowControlTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveProducerFlowControlTest.java index b6fe862c78..808fadfca8 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveProducerFlowControlTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveProducerFlowControlTest.java @@ -27,12 +27,12 @@ import org.apache.commons.logging.LogFactory; public class MasterSlaveProducerFlowControlTest extends ProducerFlowControlTest { static final Log LOG = LogFactory.getLog(MasterSlaveProducerFlowControlTest.class); - + BrokerService slave; protected BrokerService createBroker() throws Exception { BrokerService service = super.createBroker(); service.start(); - BrokerService slave = new BrokerService(); + slave = new BrokerService(); slave.setBrokerName("Slave"); slave.setPersistent(false); slave.setUseJmx(false); @@ -54,4 +54,11 @@ public class MasterSlaveProducerFlowControlTest extends ProducerFlowControlTest slave.start(); return service; } + + protected void tearDown() throws Exception { + super.tearDown(); + if (slave != null) { + slave.stop(); + } + } }