Author: ataylor
Date: 2010-12-06 05:57:42 -0500 (Mon, 06 Dec 2010)
New Revision: 10000
Modified:
trunk/tests/src/org/hornetq/tests/integration/cluster/topology/TopologyClusterTestBase.java
Log:
fixed topology test
Modified:
trunk/tests/src/org/hornetq/tests/integration/cluster/topology/TopologyClusterTestBase.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/cluster/topology/TopologyClusterTestBase.java 2010-12-06
10:41:00 UTC (rev 9999)
+++
trunk/tests/src/org/hornetq/tests/integration/cluster/topology/TopologyClusterTestBase.java 2010-12-06
10:57:42 UTC (rev 10000)
@@ -414,7 +414,7 @@
final List<String> nodes = new ArrayList<String>();
final CountDownLatch upLatch = new CountDownLatch(5);
- final CountDownLatch downLatch = new CountDownLatch(5);
+ final CountDownLatch downLatch = new CountDownLatch(4);
locator.addClusterTopologyListener(new ClusterTopologyListener()
{
@@ -454,11 +454,16 @@
waitForClusterConnections(2, 4);
waitForClusterConnections(3, 4);
waitForClusterConnections(4, 4);
+ //we cant close all of the servers, we need to leave one up to notify us
+ stopServers(4, 2, 3, 1);
- stopServers(0, 4, 2, 3, 1);
-
- assertTrue("Was not notified that all servers are Down",
upLatch.await(10, SECONDS));
- checkContains(new int[] { }, nodeIDs, nodes);
+ boolean ok = downLatch.await(10, SECONDS);
+ if(!ok)
+ {
+
System.out.println("TopologyClusterTestBase.testMultipleClientSessionFactories");
+ }
+ assertTrue("Was not notified that all servers are Down", ok);
+ checkContains(new int[] { 0 }, nodeIDs, nodes);
for (int i = 0; i < sfs.length; i++)
{
@@ -467,6 +472,8 @@
}
locator.close();
+
+ stopServers(0);
}
// Private -------------------------------------------------------
Show replies by date