activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject activemq-artemis git commit: ARTEMIS-1140: Trivial test fix
Date Wed, 03 May 2017 20:32:19 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 9e165d173 -> 0146109d6


ARTEMIS-1140: Trivial test fix


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

Branch: refs/heads/master
Commit: 0146109d6a06f9702f245034a43c49dffc5779bd
Parents: 9e165d1
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Wed May 3 16:12:01 2017 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Wed May 3 16:17:32 2017 -0400

----------------------------------------------------------------------
 .../artemis/jms/tests/ActiveMQServerTestCase.java         | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0146109d/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ActiveMQServerTestCase.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ActiveMQServerTestCase.java
b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ActiveMQServerTestCase.java
index 3fae952..c5128d4 100644
--- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ActiveMQServerTestCase.java
+++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ActiveMQServerTestCase.java
@@ -350,7 +350,15 @@ public abstract class ActiveMQServerTestCase {
       if (binding != null && binding instanceof LocalQueueBinding) {
          ((LocalQueueBinding) binding).getQueue().flushExecutor();
       }
-      Long messageCount = ActiveMQServerTestCase.servers.get(0).getMessageCountForQueue(queueName);
+      Long messageCount = null;
+      for (int i = 0; i < 10; i++) {
+         messageCount = servers.get(0).getMessageCountForQueue(queueName);
+         if (messageCount.longValue() == expected) {
+            break;
+         } else {
+            Thread.sleep(100);
+         }
+      }
 
       ProxyAssertSupport.assertEquals(expected, messageCount.intValue());
       return expected == messageCount.intValue();


Mime
View raw message