Author: clebert.suconic(a)jboss.com
Date: 2012-01-11 10:24:12 -0500 (Wed, 11 Jan 2012)
New Revision: 12007
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/management/QueueControlTest.java
Log:
small fix on test
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/management/QueueControlTest.java
===================================================================
---
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/management/QueueControlTest.java 2012-01-09
11:44:01 UTC (rev 12006)
+++
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/management/QueueControlTest.java 2012-01-11
15:24:12 UTC (rev 12007)
@@ -291,6 +291,12 @@
ClientMessage message = session.createMessage(false);
message.putLongProperty(Message.HDR_SCHEDULED_DELIVERY_TIME,
System.currentTimeMillis() + delay);
producer.send(message);
+
+ long timeout = System.currentTimeMillis() + 5000;
+ while (timeout > System.currentTimeMillis() &&
queueControl.getScheduledCount() != 1)
+ {
+ Thread.sleep(100);
+ }
Assert.assertEquals(1, queueControl.getScheduledCount());
ManagementTestBase.consumeMessages(0, session, queue);