Author: jmesnil
Date: 2010-07-07 08:50:27 -0400 (Wed, 07 Jul 2010)
New Revision: 9382
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlTest.java
Log:
fix testCreateAndDestroyBridge intermittent failures
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlTest.java 2010-07-07
08:16:50 UTC (rev 9381)
+++
trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlTest.java 2010-07-07
12:50:27 UTC (rev 9382)
@@ -627,6 +627,7 @@
BridgeControl bridgeControl = ManagementControlHelper.createBridgeControl(name,
mbeanServer);
assertEquals(name, bridgeControl.getName());
+ assertTrue(bridgeControl.isStarted());
// check that a message sent to the sourceAddress is put in the tagetQueue
ClientProducer producer = session.createProducer(sourceAddress);
@@ -635,16 +636,15 @@
message.putStringProperty("prop", text);
producer.send(message);
- ClientConsumer sourceConsumer = session.createConsumer(sourceQueue);
- ClientConsumer targetConsumer = session.createConsumer(targetQueue);
-
session.start();
+ ClientConsumer targetConsumer = session.createConsumer(targetQueue);
message = targetConsumer.receive(5000);
assertNotNull(message);
assertEquals(text, message.getStringProperty("prop"));
+
+ ClientConsumer sourceConsumer = session.createConsumer(sourceQueue);
assertNull(sourceConsumer.receiveImmediate());
-
serverControl.destroyBridge(name);
Show replies by date