mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-02-09 19:45:29 +00:00
ARTEMIS-1256 PagingOMETest.testPageCleanup fails
Using a Wait condition. This closes #1370 (cherry picked from commit 5c2144b7826c25e8510f870b588e873685291d74)
This commit is contained in:
parent
bc815004d2
commit
c5e88c5e2d
@ -33,6 +33,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer;
|
||||
import org.apache.activemq.artemis.core.server.Queue;
|
||||
import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
|
||||
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
|
||||
import org.apache.activemq.artemis.tests.util.Wait;
|
||||
import org.jboss.byteman.contrib.bmunit.BMRule;
|
||||
import org.jboss.byteman.contrib.bmunit.BMRules;
|
||||
import org.jboss.byteman.contrib.bmunit.BMUnitRunner;
|
||||
@ -145,7 +146,7 @@ public class PagingOMETest extends ActiveMQTestBase {
|
||||
|
||||
session.start();
|
||||
|
||||
assertEquals(numberOfMessages, queue.getMessageCount());
|
||||
Assert.assertTrue(Wait.waitFor(() -> numberOfMessages == queue.getMessageCount()));
|
||||
|
||||
// The consumer has to be created after the queue.getMessageCount assertion
|
||||
// otherwise delivery could alter the messagecount and give us a false failure
|
||||
|
Loading…
x
Reference in New Issue
Block a user