Author: borges
Date: 2012-02-08 08:31:32 -0500 (Wed, 08 Feb 2012)
New Revision: 12094
Modified:
trunk/hornetq-core/src/test/java/org/hornetq/tests/util/ServiceTestBase.java
Log:
HORNETQ-820 Avoid blocking send on clientSession.close() during tearDown(): use
session.cleanup()
Modified: trunk/hornetq-core/src/test/java/org/hornetq/tests/util/ServiceTestBase.java
===================================================================
---
trunk/hornetq-core/src/test/java/org/hornetq/tests/util/ServiceTestBase.java 2012-02-08
13:31:17 UTC (rev 12093)
+++
trunk/hornetq-core/src/test/java/org/hornetq/tests/util/ServiceTestBase.java 2012-02-08
13:31:32 UTC (rev 12094)
@@ -34,6 +34,7 @@
import org.hornetq.api.core.client.ClientSessionFactory;
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.core.client.impl.ClientSessionInternal;
import org.hornetq.core.client.impl.Topology;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.logging.Logger;
@@ -123,10 +124,16 @@
{
for (ClientSession cs : clientSessions)
{
+ if (cs == null)
+ continue;
try
{
- if (cs != null)
+ if (cs instanceof ClientSessionInternal)
{
+ ((ClientSessionInternal)cs).cleanUp(false);
+ }
+ else
+ {
cs.close();
}
}
Show replies by date