mirror of https://github.com/apache/activemq.git
ensure connection is closed - fix intermittent failure
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1442172 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0d529af312
commit
274d228114
|
@ -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();
|
||||
|
@ -123,7 +124,7 @@ public class FailoverUpdateURIsTest extends TestCase {
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue