You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2013/02/06 16:58:17 UTC
svn commit: r1443034 -
/activemq/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ComplexRequestReplyTest.java
Author: tabish
Date: Wed Feb 6 15:58:16 2013
New Revision: 1443034
URL: http://svn.apache.org/viewvc?rev=1443034&view=rev
Log:
Add some additional try / finally blocks to ensure BrokerService stops are issued.
Modified:
activemq/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ComplexRequestReplyTest.java
Modified: activemq/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ComplexRequestReplyTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ComplexRequestReplyTest.java?rev=1443034&r1=1443033&r2=1443034&view=diff
==============================================================================
--- activemq/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ComplexRequestReplyTest.java (original)
+++ activemq/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ComplexRequestReplyTest.java Wed Feb 6 15:58:16 2013
@@ -66,8 +66,13 @@ public class ComplexRequestReplyTest {
@After
public void tearDown() throws Exception {
- shutdownBrokerA();
- shutdownBrokerB();
+ try {
+ shutdownBrokerA();
+ } catch (Exception ex) {}
+
+ try {
+ shutdownBrokerB();
+ } catch (Exception e) {}
}
@Test
@@ -137,10 +142,13 @@ public class ComplexRequestReplyTest {
}
private void shutdownBrokerA() throws Exception {
- brokerAContext.stop();
- brokerA.stop();
- brokerA.waitUntilStopped();
- brokerA = null;
+ try {
+ brokerAContext.stop();
+ } catch (Exception e) {
+ brokerA.stop();
+ brokerA.waitUntilStopped();
+ brokerA = null;
+ }
}
private void createBrokerB() throws Exception {
@@ -151,10 +159,13 @@ public class ComplexRequestReplyTest {
}
private void shutdownBrokerB() throws Exception {
- brokerBContext.stop();
- brokerB.stop();
- brokerB.waitUntilStopped();
- brokerB = null;
+ try {
+ brokerBContext.stop();
+ } finally {
+ brokerB.stop();
+ brokerB.waitUntilStopped();
+ brokerB = null;
+ }
}
private BrokerService createBroker(String name) throws Exception {