This closes #2225
This commit is contained in:
commit
9109fc1604
|
@ -800,13 +800,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(null);
|
Wait.assertEquals(2, () -> queueControl.listMessages(null).length);
|
||||||
Assert.assertEquals(2, messages.length);
|
|
||||||
|
|
||||||
consumeMessages(2, session, queue);
|
consumeMessages(2, session, queue);
|
||||||
|
|
||||||
messages = queueControl.listMessages(null);
|
Wait.assertEquals(0, () -> queueControl.listMessages(null).length);
|
||||||
Assert.assertEquals(0, messages.length);
|
|
||||||
|
|
||||||
session.deleteQueue(queue);
|
session.deleteQueue(queue);
|
||||||
}
|
}
|
||||||
|
@ -823,13 +821,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);
|
||||||
}
|
}
|
||||||
|
@ -1930,7 +1926,7 @@ public class QueueControlTest extends ManagementTestBase {
|
||||||
producer.send(message);
|
producer.send(message);
|
||||||
|
|
||||||
QueueControl queueControl = createManagementControl(address, queue);
|
QueueControl queueControl = createManagementControl(address, queue);
|
||||||
Assert.assertEquals(1, getMessageCount(queueControl));
|
Wait.assertEquals(1, () -> getMessageCount(queueControl));
|
||||||
|
|
||||||
// the message IDs are set on the server
|
// the message IDs are set on the server
|
||||||
Map<String, Object>[] messages = queueControl.listMessages(null);
|
Map<String, Object>[] messages = queueControl.listMessages(null);
|
||||||
|
@ -1963,7 +1959,7 @@ public class QueueControlTest extends ManagementTestBase {
|
||||||
producer.send(message);
|
producer.send(message);
|
||||||
|
|
||||||
QueueControl queueControl = createManagementControl(address, queue);
|
QueueControl queueControl = createManagementControl(address, queue);
|
||||||
Assert.assertEquals(1, getMessageCount(queueControl));
|
Wait.assertEquals(1, () -> getMessageCount(queueControl));
|
||||||
|
|
||||||
// the message IDs are set on the server
|
// the message IDs are set on the server
|
||||||
Map<String, Object>[] messages = queueControl.listMessages(null);
|
Map<String, Object>[] messages = queueControl.listMessages(null);
|
||||||
|
@ -2315,17 +2311,17 @@ public class QueueControlTest extends ManagementTestBase {
|
||||||
|
|
||||||
ClientProducer producer = session.createProducer(address);
|
ClientProducer producer = session.createProducer(address);
|
||||||
producer.send(session.createMessage(durable));
|
producer.send(session.createMessage(durable));
|
||||||
Assert.assertEquals(1, getMessagesAdded(queueControl));
|
Wait.assertEquals(1, () -> getMessagesAdded(queueControl));
|
||||||
producer.send(session.createMessage(durable));
|
producer.send(session.createMessage(durable));
|
||||||
Assert.assertEquals(2, getMessagesAdded(queueControl));
|
Wait.assertEquals(2, () -> getMessagesAdded(queueControl));
|
||||||
|
|
||||||
consumeMessages(2, session, queue);
|
consumeMessages(2, session, queue);
|
||||||
|
|
||||||
Assert.assertEquals(2, getMessagesAdded(queueControl));
|
Wait.assertEquals(2, () -> getMessagesAdded(queueControl));
|
||||||
|
|
||||||
queueControl.resetMessagesAdded();
|
queueControl.resetMessagesAdded();
|
||||||
|
|
||||||
Assert.assertEquals(0, getMessagesAdded(queueControl));
|
Wait.assertEquals(0, () -> getMessagesAdded(queueControl));
|
||||||
|
|
||||||
session.deleteQueue(queue);
|
session.deleteQueue(queue);
|
||||||
}
|
}
|
||||||
|
@ -2370,8 +2366,9 @@ public class QueueControlTest extends ManagementTestBase {
|
||||||
producer.send(message);
|
producer.send(message);
|
||||||
|
|
||||||
// the message IDs are set on the server
|
// the message IDs are set on the server
|
||||||
Map<String, Object>[] messages = queueControl.listMessages(null);
|
Map<String, Object>[] messages;
|
||||||
Assert.assertEquals(1, messages.length);
|
Wait.assertEquals(1, () -> queueControl.listMessages(null).length);
|
||||||
|
messages = queueControl.listMessages(null);
|
||||||
long messageID = (Long) messages[0].get("messageID");
|
long messageID = (Long) messages[0].get("messageID");
|
||||||
|
|
||||||
queueControl.expireMessage(messageID);
|
queueControl.expireMessage(messageID);
|
||||||
|
|
Loading…
Reference in New Issue