activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-706 No Keep Alives from Broker (test improvement) -- make the test run quicker
Date Tue, 06 Sep 2016 02:12:56 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 15e4799d4 -> b13d1b0d8


ARTEMIS-706 No Keep Alives from Broker (test improvement)
  -- make the test run quicker


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

Branch: refs/heads/master
Commit: ec0f05f93dbc051afbb17884fe860c10920dde39
Parents: 15e4799
Author: Howard Gao <howard.gao@gmail.com>
Authored: Tue Sep 6 00:12:54 2016 +0800
Committer: Howard Gao <howard.gao@gmail.com>
Committed: Tue Sep 6 00:12:54 2016 +0800

----------------------------------------------------------------------
 .../tests/integration/openwire/SimpleOpenWireTest.java      | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec0f05f9/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
index 3c2d847..ca3ea23 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
@@ -58,6 +58,11 @@ public class SimpleOpenWireTest extends BasicOpenWireTest {
    @Override
    @Before
    public void setUp() throws Exception {
+      //this system property is used to construct the executor in
+      //org.apache.activemq.transport.AbstractInactivityMonitor.createExecutor()
+      //and affects the pool's shutdown time. (default is 30 sec)
+      //set it to 2 to make tests shutdown quicker.
+      System.setProperty("org.apache.activemq.transport.AbstractInactivityMonitor.keepAliveTime",
"2");
       this.realStore = true;
       super.setUp();
    }
@@ -849,7 +854,7 @@ public class SimpleOpenWireTest extends BasicOpenWireTest {
     */
    @Test
    public void testSendReceiveUsingTtl() throws Exception {
-      String brokerUri = "failover://tcp://" + OWHOST + ":" + OWPORT + "?wireFormat.maxInactivityDuration=10000&wireFormat.maxInactivityDurationInitalDelay=5000";
+      String brokerUri = "failover://tcp://" + OWHOST + ":" + OWPORT + "?wireFormat.maxInactivityDuration=5000&wireFormat.maxInactivityDurationInitalDelay=1000";
       ActiveMQConnectionFactory testFactory = new ActiveMQConnectionFactory(brokerUri);
 
       Connection sendConnection = testFactory.createConnection();
@@ -858,7 +863,7 @@ public class SimpleOpenWireTest extends BasicOpenWireTest {
       System.out.println("created receive connection: " + receiveConnection);
 
       try {
-         final int nMsg = 20;
+         final int nMsg = 10;
          final long delay = 2L;
 
          AsyncConsumer consumer = new AsyncConsumer(queueName, receiveConnection, Session.CLIENT_ACKNOWLEDGE,
delay, nMsg);


Mime
View raw message