Author: borges
Date: 2011-11-04 06:09:55 -0400 (Fri, 04 Nov 2011)
New Revision: 11661
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
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/failover/GroupingFailoverTestBase.java
Log:
HORNETQ-720 Do not try to announce a remote backup (as it does not have the live's
nodeID at this point).
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
===================================================================
---
trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2011-11-04
10:09:32 UTC (rev 11660)
+++
trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2011-11-04
10:09:55 UTC (rev 11661)
@@ -206,7 +206,7 @@
for (ClusterConnection conn : clusterConnections.values())
{
conn.start();
- if (backup)
+ if (backup && configuration.isSharedStore())
{
conn.informTopology();
conn.announceBackup();
@@ -378,8 +378,7 @@
if (connector == null)
{
- log.warn("No connector with name '" + config.getConnectorName()
+
- "'. backup cannot be announced.");
+ log.warn("No connector with name '" + config.getConnectorName()
+ "'. backup cannot be announced.");
return;
}
liveChannel.send(new BackupRegistrationMessage(nodeUUID.toString(),
connector));
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-11-04
10:09:32 UTC (rev 11660)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-11-04
10:09:55 UTC (rev 11661)
@@ -815,7 +815,7 @@
}
SimpleString id =
(SimpleString)message.getObjectProperty(Message.HDR_GROUP_ID);
- System.out.println("received " + id + " on consumer " +
consumerIDs[i]);
+
if (groupIdsReceived.get(id) == null)
{
groupIdsReceived.put(id, i);
@@ -932,9 +932,8 @@
message.getObjectProperty(ClusterTestBase.COUNT_PROP);
}
outOfOrder = true;
- System.out.println("Message j=" + j +
- " was received out of order = " +
-
message.getObjectProperty(ClusterTestBase.COUNT_PROP));
+ System.out.println("Message j=" + j + " was received out of
order = " +
+ message.getObjectProperty(ClusterTestBase.COUNT_PROP));
log.info("Message j=" + j +
" was received out of order = " +
message.getObjectProperty(ClusterTestBase.COUNT_PROP));
@@ -1991,13 +1990,10 @@
}
timeStarts[node] = System.currentTimeMillis();
- servers[node].setIdentity("server " + node);
log.info("starting server " + servers[node]);
servers[node].start();
log.info("started server " + servers[node]);
-
- log.info("started server " + node);
}
for (int node : nodes)
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/GroupingFailoverTestBase.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/GroupingFailoverTestBase.java 2011-11-04
10:09:32 UTC (rev 11660)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/GroupingFailoverTestBase.java 2011-11-04
10:09:55 UTC (rev 11661)
@@ -44,7 +44,7 @@
setUpGroupHandler(GroupingHandlerConfiguration.TYPE.LOCAL, 2);
- startServers(2, 0, 1);
+ startServers(0, 1, 2);
setupSessionFactory(0, isNetty());
setupSessionFactory(1, isNetty());
@@ -109,7 +109,7 @@
setUpGroupHandler(GroupingHandlerConfiguration.TYPE.LOCAL, 2);
- startServers(2, 0, 1);
+ startServers(0, 1, 2);
setupSessionFactory(0, isNetty());
@@ -146,7 +146,7 @@
closeSessionFactory(0);
Thread.sleep(1000);
-
+
servers[0].stop(true);
waitForServerRestart(2);