NO-JIRA fix flaky tests QueueControlTest#testResetMessagesExpired
The occasional assertion error is prevented by using Wait.assertEquals where Assert.assertEquals was used previously. java.lang.AssertionError: Expected :1 Actual :0 [...] at org.junit.Assert.assertEquals(Assert.java:542) at org.apache.activemq.artemis.tests.integration.management.QueueControlTest.testResetMessagesExpired(QueueControlTest.java:2370)
This commit is contained in:
parent
c6521e0700
commit
fed0426ff3
|
@ -2366,8 +2366,9 @@ public class QueueControlTest extends ManagementTestBase {
|
|||
producer.send(message);
|
||||
|
||||
// the message IDs are set on the server
|
||||
Map<String, Object>[] messages = queueControl.listMessages(null);
|
||||
Assert.assertEquals(1, messages.length);
|
||||
Map<String, Object>[] messages;
|
||||
Wait.assertEquals(1, () -> queueControl.listMessages(null).length);
|
||||
messages = queueControl.listMessages(null);
|
||||
long messageID = (Long) messages[0].get("messageID");
|
||||
|
||||
queueControl.expireMessage(messageID);
|
||||
|
|
Loading…
Reference in New Issue