NO-JIRA: Fixing a test

This commit is contained in:
Clebert Suconic 2017-06-22 17:59:55 -04:00
parent 339fa20f2b
commit e709fc366d
1 changed files with 3 additions and 2 deletions

View File

@ -277,7 +277,8 @@ public class RoutingTest extends ActiveMQTestBase {
ClientMessage message = sendSession.createMessage(false); ClientMessage message = sendSession.createMessage(false);
p.send(message); p.send(message);
sendSession.close(); sendSession.close();
assertEquals(1, server.locateQueue(queueA).getMessageCount() + server.locateQueue(queueB).getMessageCount());
assertEquals(2, server.locateQueue(queueC).getMessageCount() + server.locateQueue(queueD).getMessageCount()); assertTrue(Wait.waitFor(() -> server.locateQueue(queueA).getMessageCount() + server.locateQueue(queueB).getMessageCount() == 1));
assertTrue(Wait.waitFor(() -> server.locateQueue(queueC).getMessageCount() + server.locateQueue(queueD).getMessageCount() == 2));
} }
} }