Author: borges
Date: 2011-07-22 09:56:11 -0400 (Fri, 22 Jul 2011)
New Revision: 11021
Modified:
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTest.java
Log:
Close all test's resources
Modified:
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTest.java
===================================================================
---
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTest.java 2011-07-22
13:55:28 UTC (rev 11020)
+++
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTest.java 2011-07-22
13:56:11 UTC (rev 11021)
@@ -684,13 +684,13 @@
{
createSessionFactory();
- ClientSession session = createSession(sf, true, false, false);
+ final ClientSession session = createSession(sf, true, false, false);
Xid xid = new XidImpl("uhuhuhu".getBytes(), 126512,
"auhsduashd".getBytes());
session.createQueue(FailoverTestBase.ADDRESS, FailoverTestBase.ADDRESS, null,
true);
- ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
+ final ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
@@ -711,6 +711,7 @@
catch (XAException e)
{
Assert.assertEquals(XAException.XA_RBOTHER, e.errorCode);
+ session.rollback();
}
ClientConsumer consumer = session.createConsumer(FailoverTestBase.ADDRESS);
@@ -721,6 +722,8 @@
Assert.assertNull(message);
+ producer.close();
+ consumer.close();
session.close();
closeSessionFactory();
Show replies by date