NO-JIRA fix flaky test QueueControlTest#testListMessagesWithEmptyFilter
The below error is prevented by using Wait.assertEquals where Assert.assertEquals was used previously. java.lang.AssertionError: Expected :2 Actual :1 [...] at org.apache.activemq.artemis.tests.integration.management.QueueControlTest.testListMessagesWithEmptyFilter(QueueControlTest.java:827)
This commit is contained in:
parent
1b15f95554
commit
5c2f79ed45
|
@ -823,13 +823,11 @@ public class QueueControlTest extends ManagementTestBase {
|
|||
producer.send(session.createMessage(durable));
|
||||
producer.send(session.createMessage(durable));
|
||||
|
||||
Map<String, Object>[] messages = queueControl.listMessages("");
|
||||
Assert.assertEquals(2, messages.length);
|
||||
Wait.assertEquals(2, () -> queueControl.listMessages("").length);
|
||||
|
||||
consumeMessages(2, session, queue);
|
||||
|
||||
messages = queueControl.listMessages("");
|
||||
Assert.assertEquals(0, messages.length);
|
||||
Wait.assertEquals(0, () -> queueControl.listMessages("").length);
|
||||
|
||||
session.deleteQueue(queue);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue