activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/3] activemq-artemis git commit: NO-JIRA Using Wait.assertEquals on test
Date Mon, 26 Feb 2018 22:25:54 GMT
NO-JIRA Using Wait.assertEquals on test


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/691300d1
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/691300d1
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/691300d1

Branch: refs/heads/master
Commit: 691300d10e74e58855f38599988de0fb969982c4
Parents: ecf4110
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Mon Feb 26 16:12:22 2018 -0500
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Mon Feb 26 16:40:35 2018 -0500

----------------------------------------------------------------------
 .../artemis/junit/ActiveMQConsumerResourceTest.java         | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/691300d1/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQConsumerResourceTest.java
----------------------------------------------------------------------
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 c51735a..c37a10a 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);


Mime
View raw message