NO-JIRA fixing test

AmqpExpiredMessageTest will expire messages, eventually the counter could be 0
so it is invalid to assertEquals(1, queue.getMessageCount()) as it will be 0 eventually.
This commit is contained in:
Clebert Suconic 2020-05-04 15:31:18 -04:00
parent 7438d7ff07
commit 974423e0d2
1 changed files with 1 additions and 2 deletions

View File

@ -50,14 +50,13 @@ public class AmqpExpiredMessageTest extends AmqpClientTestSupport {
sender.send(message);
sender.close();
Wait.assertEquals(1, queueView::getMessageCount);
// Now try and get the message
AmqpReceiver receiver = session.createReceiver(getQueueName());
receiver.flow(1);
AmqpMessage received = receiver.receiveNoWait();
assertNull(received);
Wait.assertEquals(0, queueView::getMessageCount);
Wait.assertEquals(1, queueView::getMessagesExpired);
connection.close();