mirror of https://github.com/apache/activemq.git
Add some additional try / finally blocks to ensure BrokerService stops are issued.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1443034 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
56174e770d
commit
dc33c5918f
|
@ -66,8 +66,13 @@ public class ComplexRequestReplyTest {
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
shutdownBrokerA();
|
try {
|
||||||
shutdownBrokerB();
|
shutdownBrokerA();
|
||||||
|
} catch (Exception ex) {}
|
||||||
|
|
||||||
|
try {
|
||||||
|
shutdownBrokerB();
|
||||||
|
} catch (Exception e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -137,10 +142,13 @@ public class ComplexRequestReplyTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void shutdownBrokerA() throws Exception {
|
private void shutdownBrokerA() throws Exception {
|
||||||
brokerAContext.stop();
|
try {
|
||||||
brokerA.stop();
|
brokerAContext.stop();
|
||||||
brokerA.waitUntilStopped();
|
} catch (Exception e) {
|
||||||
brokerA = null;
|
brokerA.stop();
|
||||||
|
brokerA.waitUntilStopped();
|
||||||
|
brokerA = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createBrokerB() throws Exception {
|
private void createBrokerB() throws Exception {
|
||||||
|
@ -151,10 +159,13 @@ public class ComplexRequestReplyTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void shutdownBrokerB() throws Exception {
|
private void shutdownBrokerB() throws Exception {
|
||||||
brokerBContext.stop();
|
try {
|
||||||
brokerB.stop();
|
brokerBContext.stop();
|
||||||
brokerB.waitUntilStopped();
|
} finally {
|
||||||
brokerB = null;
|
brokerB.stop();
|
||||||
|
brokerB.waitUntilStopped();
|
||||||
|
brokerB = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private BrokerService createBroker(String name) throws Exception {
|
private BrokerService createBroker(String name) throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue