From 4e011e0a85b9d7638df5dd7ea9897a879c485f7d Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Fri, 15 Jun 2012 11:03:53 +0000 Subject: [PATCH] ensure speedy stop of broker on connection close git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1350572 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/pool/PooledConnectionTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/activemq-pool/src/test/java/org/apache/activemq/pool/PooledConnectionTest.java b/activemq-pool/src/test/java/org/apache/activemq/pool/PooledConnectionTest.java index 862ea34b17..5e51bec5ed 100644 --- a/activemq-pool/src/test/java/org/apache/activemq/pool/PooledConnectionTest.java +++ b/activemq-pool/src/test/java/org/apache/activemq/pool/PooledConnectionTest.java @@ -84,7 +84,9 @@ public class PooledConnectionTest extends TestCase { Assert.fail("calling ActiveMQConnection.setClientID() twice with different clientID must raise an IllegalStateException"); } catch (IllegalStateException ise) { log.debug("Correctly received " + ise); - } + } finally { + conn.close(); + } // 3rd test: try to call setClientID() after start() // should result in an exception @@ -96,7 +98,9 @@ public class PooledConnectionTest extends TestCase { Assert.fail("Calling setClientID() after start() mut raise a JMSException."); } catch (IllegalStateException ise) { log.debug("Correctly received " + ise); - } + } finally { + conn.close(); + } log.debug("Test finished."); }