diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2102Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2102Test.java index c89c9c96f5..a72b52cd0d 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2102Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2102Test.java @@ -464,7 +464,7 @@ public class AMQ2102Test extends CombinationTestSupport implements UncaughtExcep } }; t.start(); - Thread.sleep(2000); + master.waitUntilStarted(); masterUrl = master.getTransportConnectors().get(0).getConnectUri().toString(); debug("masterUrl: " + masterUrl); @@ -474,6 +474,7 @@ public class AMQ2102Test extends CombinationTestSupport implements UncaughtExcep slave.addConnector("tcp://localhost:0"); slave.setMasterConnectorURI(masterUrl); slave.start(); + slave.waitUntilStarted(); } public void tearDown() throws Exception {