ARTEMIS-3135 Fixing intermittent test failure

This commit is contained in:
Clebert Suconic 2021-02-23 13:59:24 -05:00
parent a56ade38b4
commit 66040b009c
1 changed files with 2 additions and 2 deletions

View File

@ -148,13 +148,13 @@ public class JMXManagementTest extends JMSClientTestSupport {
SimpleString queue = new SimpleString(getQueueName());
QueueControl queueControl = createManagementControl(queue, queue);
Assert.assertEquals(2, queueControl.getMessageCount());
Wait.assertEquals(2, queueControl::getMessageCount);
JsonArray array = JsonUtil.readJsonArray(queueControl.getFirstMessageAsJSON());
JsonObject object = (JsonObject) array.get(0);
queueControl.removeMessage(object.getJsonNumber("messageID").longValue());
Wait.assertEquals(1L, queueControl::getMessageCount);
Wait.assertEquals(1, queueControl::getMessageCount);
Map<String, Object>[] messages = queueControl.listMessages("");
Assert.assertEquals(1, messages.length);