Repository: activemq-artemis Updated Branches: refs/heads/master 095ce777d -> 5c2144b78
ARTEMIS-1256 PagingOMETest.testPageCleanup fails Using a Wait condition. This closes #1370 Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/5c2144b7 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/5c2144b7 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/5c2144b7 Branch: refs/heads/master Commit: 5c2144b7826c25e8510f870b588e873685291d74 Parents: 095ce77 Author: Clebert Suconic <[email protected]> Authored: Tue Jun 27 12:48:33 2017 -0400 Committer: Clebert Suconic <[email protected]> Committed: Tue Jun 27 12:48:35 2017 -0400 ---------------------------------------------------------------------- .../activemq/artemis/tests/extras/byteman/PagingOMETest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5c2144b7/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/PagingOMETest.java ---------------------------------------------------------------------- diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/PagingOMETest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/PagingOMETest.java index cdf1c56..7ef4e9f 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/PagingOMETest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/PagingOMETest.java @@ -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
