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 tests that fail on loaded system
Date Wed, 23 Aug 2017 14:52:19 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master a85e75daa -> 9021e0301


NO-JIRA Fix tests that fail on loaded system

Tests that can fail on loaded system due to not waiting for metrics
updates.

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

Branch: refs/heads/master
Commit: 9021e0301dc64edb9e1a8d6fabdc9f8c1a4468f4
Parents: a85e75d
Author: Timothy Bish <tabish121@gmail.com>
Authored: Wed Aug 23 10:51:31 2017 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Wed Aug 23 10:51:31 2017 -0400

----------------------------------------------------------------------
 .../tests/integration/amqp/AmqpDescribedTypePayloadTest.java     | 4 ++--
 .../artemis/tests/integration/amqp/AmqpReceiverDrainTest.java    | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9021e030/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpDescribedTypePayloadTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpDescribedTypePayloadTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpDescribedTypePayloadTest.java
index e8c4432..5ee3de0 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpDescribedTypePayloadTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpDescribedTypePayloadTest.java
@@ -59,7 +59,7 @@ public class AmqpDescribedTypePayloadTest extends JMSClientTestSupport {
       sender.close();
 
       Queue queue = getProxyToQueue(getQueueName());
-      assertEquals(1, queue.getMessageCount());
+      assertTrue("Should be one message on Queue.", Wait.waitFor(() -> queue.getMessageCount()
== 1));
 
       AmqpReceiver receiver = session.createReceiver(getQueueName());
       receiver.flow(1);
@@ -86,7 +86,7 @@ public class AmqpDescribedTypePayloadTest extends JMSClientTestSupport {
       connection.close();
 
       Queue queue = getProxyToQueue(getQueueName());
-      assertEquals(1, queue.getMessageCount());
+      assertTrue("Should be one message on Queue.", Wait.waitFor(() -> queue.getMessageCount()
== 1));
 
       ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(getBrokerOpenWireConnectionURI());
       Connection jmsConnection = factory.createConnection();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9021e030/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpReceiverDrainTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpReceiverDrainTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpReceiverDrainTest.java
index edf9459..ca2a30e 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpReceiverDrainTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpReceiverDrainTest.java
@@ -20,6 +20,7 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.activemq.artemis.core.server.Queue;
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
+import org.apache.activemq.artemis.tests.util.Wait;
 import org.apache.activemq.transport.amqp.client.AmqpClient;
 import org.apache.activemq.transport.amqp.client.AmqpConnection;
 import org.apache.activemq.transport.amqp.client.AmqpMessage;
@@ -62,7 +63,7 @@ public class AmqpReceiverDrainTest extends AmqpClientTestSupport {
 
       Queue queueView = getProxyToQueue(destinationName);
 
-      assertEquals(MSG_COUNT, queueView.getMessageCount());
+      assertTrue("Messages did not get queued", Wait.waitFor(() -> queueView.getMessageCount()
== MSG_COUNT));
       assertEquals(0, queueView.getDeliveringCount());
 
       receiver.drain(MSG_COUNT);


Mime
View raw message