activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject [3/3] activemq git commit: AMQ-2910 fix timing on test timeout - ensure consumer connection is started
Date Thu, 01 Sep 2016 15:55:13 GMT
AMQ-2910 fix timing on test timeout - ensure consumer connection is started


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

Branch: refs/heads/master
Commit: a0d05f8ea3e883a16d86b4a6755f7fc1a503f55b
Parents: a9c7f71
Author: gtully <gary.tully@gmail.com>
Authored: Thu Sep 1 16:54:50 2016 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Thu Sep 1 16:54:50 2016 +0100

----------------------------------------------------------------------
 .../org/apache/activemq/JmsMultipleClientsTestSupport.java     | 2 +-
 .../src/test/java/org/apache/activemq/bugs/AMQ2910Test.java    | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/a0d05f8e/activemq-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java
index 5eaab8d..39fdd6d 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java
@@ -185,10 +185,10 @@ public class JmsMultipleClientsTestSupport {
 
     protected MessageConsumer createMessageConsumer(Connection conn, Destination dest) throws
Exception {
         connections.add(conn);
+        conn.start();
 
         Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
         final MessageConsumer consumer = sess.createConsumer(dest);
-        conn.start();
 
         return consumer;
     }

http://git-wip-us.apache.org/repos/asf/activemq/blob/a0d05f8e/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2910Test.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2910Test.java b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2910Test.java
index 9fec7ce..1554cba 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2910Test.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2910Test.java
@@ -61,7 +61,7 @@ public class AMQ2910Test extends JmsMultipleClientsTestSupport {
         return broker;
     }
 
-    @Test(timeout = 60 * 1000)
+    @Test(timeout = 120 * 1000)
     public void testConcurrentSendToPendingCursor() throws Exception {
         final ActiveMQConnectionFactory factory =
                 new ActiveMQConnectionFactory(broker.getTransportConnectors().get(0).getConnectUri());
@@ -102,9 +102,9 @@ public class AMQ2910Test extends JmsMultipleClientsTestSupport {
         }
 
         executor.shutdown();
-        assertTrue("consumers completed", executor.awaitTermination(60, TimeUnit.SECONDS));
+        assertTrue("consumers completed", executor.awaitTermination(30, TimeUnit.SECONDS));
 
-        allMessagesList.setMaximumDuration(120*1000);
+        allMessagesList.setMaximumDuration(90*1000);
         final int numExpected = maxConcurrency * msgCount;
         allMessagesList.waitForMessagesToArrive(numExpected);
 


Mime
View raw message