NO-JIRA Fixing ExpiryRunnerTest intermittent test failure

This commit is contained in:
Clebert Suconic 2021-08-19 08:46:03 -04:00
parent fac1c4320d
commit 52f429afa1
1 changed files with 3 additions and 3 deletions

View File

@ -135,9 +135,9 @@ public class ExpiryRunnerTest extends ActiveMQTestBase {
Assert.assertEquals("m" + i, cm.getBodyBuffer().readString());
}
consumer.close();
Thread.sleep(2100);
Assert.assertEquals(0, ((Queue) server.getPostOffice().getBinding(qName).getBindable()).getMessageCount());
Assert.assertEquals(0, ((Queue) server.getPostOffice().getBinding(qName).getBindable()).getDeliveringCount());
Wait.assertEquals(0, ((Queue) server.getPostOffice().getBinding(qName).getBindable())::getMessageCount);
Wait.assertEquals(0, ((Queue) server.getPostOffice().getBinding(qName).getBindable())::getDeliveringCount);
Wait.assertEquals(numMessages / 2, ((Queue) server.getPostOffice().getBinding(qName).getBindable())::getMessagesExpired);
}
@Test