From 691300d10e74e58855f38599988de0fb969982c4 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Mon, 26 Feb 2018 16:12:22 -0500 Subject: [PATCH] NO-JIRA Using Wait.assertEquals on test --- .../artemis/junit/ActiveMQConsumerResourceTest.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQConsumerResourceTest.java b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQConsumerResourceTest.java index c51735a1b2..c37a10a428 100644 --- a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQConsumerResourceTest.java +++ b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQConsumerResourceTest.java @@ -26,7 +26,6 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.RuleChain; -import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; public class ActiveMQConsumerResourceTest { @@ -58,13 +57,7 @@ public class ActiveMQConsumerResourceTest { @After public void tearDown() throws Exception { assertNotNull(String.format(ASSERT_SENT_FORMAT, TEST_ADDRESS), sent); - Wait.waitFor(new Wait.Condition() { - @Override - public boolean isSatisfied() throws Exception { - return server.getMessageCount(TEST_QUEUE) == 1; - } - }, 5000, 100); - assertEquals(String.format(ASSERT_COUNT_FORMAT, TEST_QUEUE), 1, server.getMessageCount(TEST_QUEUE)); + Wait.assertEquals(1, () -> server.getMessageCount(TEST_QUEUE)); ClientMessage received = consumer.receiveMessage(); assertNotNull(String.format(ASSERT_RECEIVED_FORMAT, TEST_ADDRESS), received);