Author: borges
Date: 2011-10-25 08:31:02 -0400 (Tue, 25 Oct 2011)
New Revision: 11585
Modified:
trunk/hornetq-core/src/test/java/org/hornetq/tests/util/ServiceTestBase.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
Log:
First start all servers, and then wait for isStarted()
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 2011-10-25
12:30:43 UTC (rev 11584)
+++
trunk/hornetq-core/src/test/java/org/hornetq/tests/util/ServiceTestBase.java 2011-10-25
12:31:02 UTC (rev 11585)
@@ -262,22 +262,22 @@
{
if (acceptor)
{
- className = NettyAcceptorFactory.class.getName();
+ className = NETTY_ACCEPTOR_FACTORY;
}
else
{
- className = NettyConnectorFactory.class.getName();
+ className = NETTY_CONNECTOR_FACTORY;
}
}
else
{
if (acceptor)
{
- className = InVMAcceptorFactory.class.getName();
+ className = INVM_ACCEPTOR_FACTORY;
}
else
{
- className = InVMConnectorFactory.class.getName();
+ className = INVM_CONNECTOR_FACTORY;
}
}
return new TransportConfiguration(className, params);
@@ -309,13 +309,13 @@
long timetowait = System.currentTimeMillis() + 5000;
while (!server.isStarted() && System.currentTimeMillis() < timetowait)
{
- Thread.sleep(100);
+ Thread.sleep(50);
}
if (!server.isStarted())
{
log.info(threadDump("Server didn't start"));
- fail("server didnt start");
+ fail("server didnt start: " + server);
}
if (!server.getConfiguration().isBackup())
@@ -323,12 +323,12 @@
timetowait = System.currentTimeMillis() + 5000;
while (!server.isInitialised() && System.currentTimeMillis() <
timetowait)
{
- Thread.sleep(100);
+ Thread.sleep(50);
}
if (!server.isInitialised())
{
- fail("Server didn't initialize");
+ fail("Server didn't initialize: " + server);
}
}
}
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-10-25
12:30:43 UTC (rev 11584)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-10-25
12:31:02 UTC (rev 11585)
@@ -2189,9 +2189,11 @@
log.info("started server " + servers[node]);
log.info("started server " + node);
+ }
+ for (int node : nodes)
+ {
waitForServer(servers[node]);
-
}
}
Show replies by date