Author: jmesnil
Date: 2009-10-13 08:39:36 -0400 (Tue, 13 Oct 2009)
New Revision: 8087
Modified:
trunk/tests/src/org/hornetq/tests/integration/xa/BasicXaTest.java
Log:
ensure created sessions are properly closed
Modified: trunk/tests/src/org/hornetq/tests/integration/xa/BasicXaTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/xa/BasicXaTest.java 2009-10-13 12:17:56
UTC (rev 8086)
+++ trunk/tests/src/org/hornetq/tests/integration/xa/BasicXaTest.java 2009-10-13 12:39:36
UTC (rev 8087)
@@ -221,6 +221,8 @@
clientConsumer = clientSession.createConsumer(atestq);
m = clientConsumer.receiveImmediate();
assertNull(m);
+
+ clientSession2.close();
}
@@ -254,6 +256,13 @@
{
assertFalse(messageHandler.failedToAck);
}
+
+ clientSession2.close();
+ for (ClientSession session : clientSessions)
+ {
+ session.close();
+ }
+
}
public void testSendMultipleQueues() throws Exception
@@ -348,7 +357,8 @@
session.prepare(xid);
session.commit(xid, false);
-
+ session.close();
+
xid = newXID();
session = sessionFactory.createSession(true, false, false);
session.start(xid, XAResource.TMNOFLAGS);
@@ -368,6 +378,7 @@
session.end(xid, XAResource.TMSUCCESS);
session.rollback(xid);
+ session.close();
messagingService.stop();
messagingService.start();