Author: borges
Date: 2011-12-07 10:28:10 -0500 (Wed, 07 Dec 2011)
New Revision: 11872
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusteredRequestResponseTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/topology/TopologyClusterTestBase.java
Log:
Fix tearDown broken at refactoring.
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-12-07
11:59:15 UTC (rev 11871)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-12-07
15:28:10 UTC (rev 11872)
@@ -531,7 +531,7 @@
throw new IllegalArgumentException("No sf at " + node);
}
- ClientSession session = sf.createSession(false, true, true);
+ ClientSession session = addClientSession(sf.createSession(false, true, true));
String filterString = null;
@@ -572,6 +572,8 @@
protected void closeAllConsumers()
{
+ if (consumers == null)
+ return;
for (int i = 0; i < consumers.length; i++)
{
ConsumerHolder holder = consumers[i];
@@ -589,10 +591,10 @@
{
if (sfs != null)
{
- for (int i = 0; i < sfs.length; i++)
- {
- closeSessionFactory(sfs[i]);
- sfs[i] = null;
+ for (int i = 0; i < sfs.length; i++)
+ {
+ closeSessionFactory(sfs[i]);
+ sfs[i] = null;
}
}
super.closeAllSessionFactories();
@@ -1413,7 +1415,7 @@
locators[node].setBlockOnNonDurableSend(true);
locators[node].setBlockOnDurableSend(true);
- ClientSessionFactory sf = locators[node].createSessionFactory();
+ ClientSessionFactory sf = createSessionFactory(locators[node]);
ClientSession session = sf.createSession();
session.close();
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusteredRequestResponseTest.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusteredRequestResponseTest.java 2011-12-07
11:59:15 UTC (rev 11871)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusteredRequestResponseTest.java 2011-12-07
15:28:10 UTC (rev 11872)
@@ -13,20 +13,18 @@
package org.hornetq.tests.integration.cluster.distribution;
-import org.hornetq.core.logging.Logger;
/**
* A ClusteredRequestResponseTest
- *
+ *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
- *
+ *
* Created 3 Feb 2009 09:10:43
*
*
*/
public class ClusteredRequestResponseTest extends ClusterTestBase
{
- private static final Logger log =
Logger.getLogger(ClusteredRequestResponseTest.class);
@Override
protected void setUp() throws Exception
@@ -46,7 +44,7 @@
setupCluster();
startServers(0, 1, 2, 3, 4);
-
+
for (int i = 0 ; i < 5; i++)
{
waitForTopology(servers[i], 5);
@@ -94,7 +92,7 @@
setupCluster();
startServers(0, 1, 2, 3, 4);
-
+
for (int i = 0 ; i < 5; i++)
{
waitForTopology(servers[i], 5);
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/topology/TopologyClusterTestBase.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/topology/TopologyClusterTestBase.java 2011-12-07
11:59:15 UTC (rev 11871)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/topology/TopologyClusterTestBase.java 2011-12-07
15:28:10 UTC (rev 11872)
@@ -66,6 +66,14 @@
setupCluster();
}
+ @Override
+ protected void tearDown() throws Exception
+ {
+ stopServers(0, 1, 2, 3, 4);
+
+ super.tearDown();
+ }
+
/**
* Check that the actual list of received nodeIDs correspond to the expected order of
nodes
*/
Show replies by date