Skip to content

Commit

Permalink
NO-JIRA fix flaky tests QueueControlTest#testChangeMessagePriority{,W…
Browse files Browse the repository at this point in the history
…ithInvalidValue}

The occasional assertion error is prevented by using Wait.assertEquals
where Assert.assertEquals was used previously.

(cherry picked from commit c6521e0)
  • Loading branch information
jiridanek authored and clebertsuconic committed Aug 8, 2018
1 parent b08bff0 commit f2852cb
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -1926,7 +1926,7 @@ public void testChangeMessagePriority() throws Exception {
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);
Expand Down Expand Up @@ -1959,7 +1959,7 @@ public void testChangeMessagePriorityWithInvalidValue() throws Exception {
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);
Expand Down

0 comments on commit f2852cb

Please sign in to comment.