fix race in test
This commit is contained in:
parent
90b8b35b54
commit
d895988faf
|
@ -562,6 +562,14 @@ public class JMSServerControlTest extends ManagementTestBase
|
|||
|
||||
Assert.assertNull(fakeJMSStorageManager.destinationMap.get(queueName));
|
||||
|
||||
long timeout = System.currentTimeMillis() + 1000;
|
||||
while (timeout > System.currentTimeMillis() && !((ActiveMQMessageConsumer)cons).isClosed())
|
||||
{
|
||||
Thread.sleep(1);
|
||||
}
|
||||
|
||||
Assert.assertTrue(((ActiveMQMessageConsumer)cons).isClosed());
|
||||
|
||||
try
|
||||
{
|
||||
cons.receive(5000);
|
||||
|
|
Loading…
Reference in New Issue