Skip to content

Commit

Permalink
small fix on test
Browse files Browse the repository at this point in the history
  • Loading branch information
clebertsuconic committed Jan 11, 2012
1 parent b53faeb commit ed82216
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -291,6 +291,12 @@ public void testGetScheduledCount() throws Exception
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);
Expand Down

0 comments on commit ed82216

Please sign in to comment.