activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject activemq-artemis git commit: NO-JIRA Fix a couple random test failures
Date Tue, 17 Apr 2018 16:32:03 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master ae8b261c4 -> 98da402fb


NO-JIRA Fix a couple random test failures

Need to add a couple wait conditions to ensure valid stats are checked.

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

Branch: refs/heads/master
Commit: 98da402fb6aef8b91d90091b69a7eed5df164ce7
Parents: ae8b261
Author: Timothy Bish <tabish121@gmail.com>
Authored: Tue Apr 17 12:31:26 2018 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Tue Apr 17 12:31:26 2018 -0400

----------------------------------------------------------------------
 .../integration/amqp/AmqpSendReceiveTest.java   | 33 ++++++++++----------
 1 file changed, 17 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/98da402f/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSendReceiveTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSendReceiveTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSendReceiveTest.java
index fc4d9ad..ea62df8 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSendReceiveTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSendReceiveTest.java
@@ -16,6 +16,20 @@
  */
 package org.apache.activemq.artemis.tests.integration.amqp;
 
+import static org.apache.activemq.transport.amqp.AmqpSupport.contains;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import javax.jms.Topic;
+
 import org.apache.activemq.artemis.api.core.RoutingType;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.config.BridgeConfiguration;
@@ -37,19 +51,6 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.jms.Topic;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import static org.apache.activemq.transport.amqp.AmqpSupport.contains;
-
 /**
  * Test basic send and receive scenarios using only AMQP sender and receiver links.
  */
@@ -89,7 +90,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
 
       Queue queue = getProxyToQueue(getQueueName());
       assertNotNull(queue);
-      assertEquals(0, queue.getMessageCount());
+      Wait.assertEquals(0, queue::getMessageCount);
    }
 
    @Test(timeout = 60000)
@@ -288,7 +289,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
       receiver1.close();
       receiver2.close();
 
-      assertEquals(0, queueView.getMessageCount());
+      Wait.assertEquals(0, queueView::getMessageCount);
 
       connection.close();
    }
@@ -341,7 +342,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
 
       receiver2.close();
 
-      assertEquals(MSG_COUNT - 2, queueView.getMessageCount());
+      Wait.assertEquals(MSG_COUNT - 2, queueView::getMessageCount);
 
       connection.close();
    }


Mime
View raw message