Author: borges
Date: 2011-07-22 09:53:02 -0400 (Fri, 22 Jul 2011)
New Revision: 11017
Modified:
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
Log:
Delete spurious method
Modified:
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
---
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-07-22
13:52:26 UTC (rev 11016)
+++
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-07-22
13:53:02 UTC (rev 11017)
@@ -188,7 +188,7 @@
{
return consumers[node].consumer;
}
-
+
protected void waitForMessages(final int node, final String address, final int count)
throws Exception
{
HornetQServer server = servers[node];
@@ -752,10 +752,10 @@
for (int j = msgStart; j < msgEnd; j++)
{
-
+
ClientMessage message = holder.consumer.receive(WAIT_TIMEOUT);
-
-
+
+
if (message == null)
{
ClusterTestBase.log.info("*** dumping consumers:");
@@ -802,7 +802,7 @@
}
}
}
-
+
protected String clusterDescription(HornetQServer server)
{
String br = "-------------------------\n";
@@ -1160,7 +1160,7 @@
{
res[j++] = i;
}
-
+
if (ack)
{
// just to flush acks
@@ -1203,11 +1203,11 @@
if (netty)
{
- serverTotc = new TransportConfiguration(ServiceTestBase.NETTY_CONNECTOR_FACTORY,
params);
+ serverTotc = new TransportConfiguration(UnitTestCase.NETTY_CONNECTOR_FACTORY,
params);
}
else
{
- serverTotc = new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY,
params);
+ serverTotc = new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY,
params);
}
if (ha)
@@ -1240,11 +1240,11 @@
if (netty)
{
- serverTotc = new TransportConfiguration(ServiceTestBase.NETTY_CONNECTOR_FACTORY,
params);
+ serverTotc = new TransportConfiguration(UnitTestCase.NETTY_CONNECTOR_FACTORY,
params);
}
else
{
- serverTotc = new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY,
params);
+ serverTotc = new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY,
params);
}
locators[node] = HornetQClient.createServerLocatorWithoutHA(serverTotc);
@@ -1270,11 +1270,11 @@
if (netty)
{
- serverTotc = new TransportConfiguration(ServiceTestBase.NETTY_CONNECTOR_FACTORY,
params);
+ serverTotc = new TransportConfiguration(UnitTestCase.NETTY_CONNECTOR_FACTORY,
params);
}
else
{
- serverTotc = new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY,
params);
+ serverTotc = new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY,
params);
}
@@ -1756,12 +1756,12 @@
{
throw new IllegalStateException("No server at node " + nodeFrom);
}
-
+
TransportConfiguration connectorFrom = createTransportConfiguration(netty, false,
generateParams(nodeFrom, netty));
serverFrom.getConfiguration().getConnectorConfigurations().put(name,
connectorFrom);
List<String> pairs = null;
-
+
if (nodeTo != -1)
{
TransportConfiguration serverTotc = createTransportConfiguration(netty, false,
generateParams(nodeTo, netty));
@@ -1800,7 +1800,7 @@
TransportConfiguration connectorFrom = createTransportConfiguration(netty, false,
generateParams(nodeFrom, netty));
serverFrom.getConfiguration().getConnectorConfigurations().put(connectorFrom.getName(),
connectorFrom);
-
+
List<String> pairs = new ArrayList<String>();
for (int element : nodesTo)
{
@@ -1912,28 +1912,10 @@
for (int node : nodes)
{
//wait for each server to start, it may be a backup and started in a separate
thread
- waitForServer(servers[node]);
+ waitForComponent(servers[node], 5);
}
}
- private void waitForServer(HornetQServer server)
- throws InterruptedException
- {
- long timetowait =System.currentTimeMillis() + 5000;
- while(!server.isStarted())
- {
- Thread.sleep(100);
- if(server.isStarted())
- {
- break;
- }
- else if(System.currentTimeMillis() > timetowait)
- {
- fail("server didnt start");
- }
- }
- }
-
protected void stopClusterConnections(final int... nodes) throws Exception
{
for (int node : nodes)