NO-JIRA fix flaky tests QueueControlTest#testChangeMessagePriority{,WithInvalidValue}

The occasional assertion error is prevented by using Wait.assertEquals
where Assert.assertEquals was used previously.
This commit is contained in:
Jiri Danek 2018-08-07 20:02:41 +02:00 committed by Clebert Suconic
parent 23a30b6158
commit c6521e0700
1 changed files with 2 additions and 2 deletions

View File

@ -1926,7 +1926,7 @@ public class QueueControlTest extends ManagementTestBase {
producer.send(message);
QueueControl queueControl = createManagementControl(address, queue);
Assert.assertEquals(1, getMessageCount(queueControl));
Wait.assertEquals(1, () -> getMessageCount(queueControl));
// the message IDs are set on the server
Map<String, Object>[] messages = queueControl.listMessages(null);
@ -1959,7 +1959,7 @@ public class QueueControlTest extends ManagementTestBase {
producer.send(message);
QueueControl queueControl = createManagementControl(address, queue);
Assert.assertEquals(1, getMessageCount(queueControl));
Wait.assertEquals(1, () -> getMessageCount(queueControl));
// the message IDs are set on the server
Map<String, Object>[] messages = queueControl.listMessages(null);