Skip to content

Commit

Permalink
ensure connection is closed - fix intermittent failure
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1442172 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
gtully committed Feb 4, 2013
1 parent 0d529af commit 274d228
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class FailoverUpdateURIsTest extends TestCase {
BrokerService bs1 = null;
BrokerService bs2 = null;

@Override
public void tearDown() throws Exception {
if (connection != null) {
connection.close();
Expand Down Expand Up @@ -123,7 +124,7 @@ public void testAutoUpdateURIs() throws Exception {
bs1.start();

ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + firstTcpUri + ")");
Connection connection = cf.createConnection();
connection = cf.createConnection();
connection.start();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
Queue theQueue = session.createQueue(QUEUE_NAME);
Expand Down

0 comments on commit 274d228

Please sign in to comment.