ARTEMIS-1256 PagingOMETest.testPageCleanup fails
Using a Wait condition. This closes #1370
This commit is contained in:
parent
095ce777df
commit
5c2144b782
|
@ -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.server.Queue;
|
||||||
import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
|
import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
|
||||||
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
|
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.BMRule;
|
||||||
import org.jboss.byteman.contrib.bmunit.BMRules;
|
import org.jboss.byteman.contrib.bmunit.BMRules;
|
||||||
import org.jboss.byteman.contrib.bmunit.BMUnitRunner;
|
import org.jboss.byteman.contrib.bmunit.BMUnitRunner;
|
||||||
|
@ -145,7 +146,7 @@ public class PagingOMETest extends ActiveMQTestBase {
|
||||||
|
|
||||||
session.start();
|
session.start();
|
||||||
|
|
||||||
assertEquals(numberOfMessages, queue.getMessageCount());
|
Assert.assertTrue(Wait.waitFor(() -> numberOfMessages == queue.getMessageCount()));
|
||||||
|
|
||||||
// The consumer has to be created after the queue.getMessageCount assertion
|
// The consumer has to be created after the queue.getMessageCount assertion
|
||||||
// otherwise delivery could alter the messagecount and give us a false failure
|
// otherwise delivery could alter the messagecount and give us a false failure
|
||||||
|
|
Loading…
Reference in New Issue