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));
|
||||||
producer.send(session.createMessage(durable));
|
producer.send(session.createMessage(durable));
|
||||||
|
|
||||||
Map<String, Object>[] messages = queueControl.listMessages("");
|
Wait.assertEquals(2, () -> queueControl.listMessages("").length);
|
||||||
Assert.assertEquals(2, messages.length);
|
|
||||||
|
|
||||||
consumeMessages(2, session, queue);
|
consumeMessages(2, session, queue);
|
||||||
|
|
||||||
messages = queueControl.listMessages("");
|
Wait.assertEquals(0, () -> queueControl.listMessages("").length);
|
||||||
Assert.assertEquals(0, messages.length);
|
|
||||||
|
|
||||||
session.deleteQueue(queue);
|
session.deleteQueue(queue);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue