activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject activemq git commit: Allow the HTTP test to have extra time to wait for all messages to arrive as the transmission rate is much slower.
Date Tue, 10 May 2016 14:59:25 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 3da9b0720 -> 71893f143


Allow the HTTP test to have extra time to wait for all messages to
arrive as the transmission rate is much slower. 

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

Branch: refs/heads/master
Commit: 71893f1434a493ad5969eca70abe310d5f4d0b95
Parents: 3da9b07
Author: Timothy Bish <tabish121@gmail.com>
Authored: Tue May 10 10:59:12 2016 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Tue May 10 10:59:12 2016 -0400

----------------------------------------------------------------------
 .../TwoBrokerTopicSendReceiveUsingHttpTest.java         | 12 ++++++++++--
 .../apache/activemq/test/JmsSendReceiveTestSupport.java |  6 +++++-
 2 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/71893f14/activemq-http/src/test/java/org/apache/activemq/TwoBrokerTopicSendReceiveUsingHttpTest.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/test/java/org/apache/activemq/TwoBrokerTopicSendReceiveUsingHttpTest.java
b/activemq-http/src/test/java/org/apache/activemq/TwoBrokerTopicSendReceiveUsingHttpTest.java
index cb412c6..1f62e6d 100644
--- a/activemq-http/src/test/java/org/apache/activemq/TwoBrokerTopicSendReceiveUsingHttpTest.java
+++ b/activemq-http/src/test/java/org/apache/activemq/TwoBrokerTopicSendReceiveUsingHttpTest.java
@@ -16,21 +16,29 @@
  */
 package org.apache.activemq;
 
+import java.util.concurrent.TimeUnit;
+
 import javax.jms.JMSException;
 
-import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.usecases.TwoBrokerTopicSendReceiveTest;
 
 /**
- * 
+ *
  */
 public class TwoBrokerTopicSendReceiveUsingHttpTest extends TwoBrokerTopicSendReceiveTest
{
 
+    @Override
     protected ActiveMQConnectionFactory createReceiverConnectionFactory() throws JMSException
{
         return createConnectionFactory("org/apache/activemq/usecases/receiver-http.xml",
"receiver", "vm://receiver");
     }
 
+    @Override
     protected ActiveMQConnectionFactory createSenderConnectionFactory() throws JMSException
{
         return createConnectionFactory("org/apache/activemq/usecases/sender-http.xml", "sender",
"vm://sender");
     }
+
+    @Override
+    protected void waitForMessagesToBeDelivered() {
+        waitForMessagesToBeDelivered(TimeUnit.MINUTES.toMillis(2));
+    }
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/71893f14/activemq-unit-tests/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
index 91f6243..c67dcba 100755
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
@@ -22,6 +22,7 @@ import java.util.Collections;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 
 import javax.jms.DeliveryMode;
 import javax.jms.Destination;
@@ -201,7 +202,10 @@ public abstract class JmsSendReceiveTestSupport extends org.apache.activemq.Test
      * reached.
      */
     protected void waitForMessagesToBeDelivered() {
-        long maxWaitTime = 60000;
+        waitForMessagesToBeDelivered(TimeUnit.MINUTES.toMillis(1));
+    }
+
+    protected void waitForMessagesToBeDelivered(long maxWaitTime) {
         long waitTime = maxWaitTime;
         long start = (maxWaitTime <= 0) ? 0 : System.currentTimeMillis();
 


Mime
View raw message