You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2015/02/17 22:41:25 UTC

activemq git commit: Reduce test time by disabling the unneeded broker features.

Repository: activemq
Updated Branches:
  refs/heads/master 6e6931960 -> 141ad4cb8


Reduce test time by disabling the unneeded broker features.

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

Branch: refs/heads/master
Commit: 141ad4cb8f302c16d64d2ee95480ce2897dd5f80
Parents: 6e69319
Author: Timothy Bish <ta...@gmail.com>
Authored: Tue Feb 17 16:41:02 2015 -0500
Committer: Timothy Bish <ta...@gmail.com>
Committed: Tue Feb 17 16:41:02 2015 -0500

----------------------------------------------------------------------
 .../activemq/ActiveMQConnectionFactoryTest.java | 21 ++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/141ad4cb/activemq-unit-tests/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java
index 353f1d3..f8c6176 100755
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java
@@ -41,7 +41,7 @@ public class ActiveMQConnectionFactoryTest extends CombinationTestSupport {
 
     public void testUseURIToSetUseClientIDPrefixOnConnectionFactory() throws URISyntaxException, JMSException {
         ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(
-                                                                     "vm://localhost?jms.clientIDPrefix=Cheese");
+            "vm://localhost?jms.clientIDPrefix=Cheese&broker.persistent=false");
         assertEquals("Cheese", cf.getClientIDPrefix());
 
         connection = (ActiveMQConnection)cf.createConnection();
@@ -54,6 +54,12 @@ public class ActiveMQConnectionFactoryTest extends CombinationTestSupport {
     }
 
     @Override
+    public void setUp() throws Exception {
+        LOG.info("=========== Start test " + getName());
+        super.setUp();
+    }
+
+    @Override
     public void tearDown() throws Exception {
         // Try our best to close any previously opend connection.
         try {
@@ -65,6 +71,8 @@ public class ActiveMQConnectionFactoryTest extends CombinationTestSupport {
             broker.stop();
         } catch (Throwable ignore) {
         }
+
+        LOG.info("=========== Finished test " + getName());
     }
 
     public void testUseURIToSetOptionsOnConnectionFactory() throws URISyntaxException, JMSException {
@@ -89,7 +97,7 @@ public class ActiveMQConnectionFactoryTest extends CombinationTestSupport {
 
     public void testUseURIToConfigureRedeliveryPolicy() throws URISyntaxException, JMSException {
         ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(
-                                                                     "vm://localhost?jms.redeliveryPolicy.maximumRedeliveries=2");
+            "vm://localhost?broker.persistent=false&broker.useJmx=false&jms.redeliveryPolicy.maximumRedeliveries=2");
         assertEquals("connection redeliveries", 2, cf.getRedeliveryPolicy().getMaximumRedeliveries());
 
         ActiveMQConnection connection = (ActiveMQConnection)cf.createConnection();
@@ -103,7 +111,8 @@ public class ActiveMQConnectionFactoryTest extends CombinationTestSupport {
     }
 
     public void testCreateVMConnectionWithEmbdeddBroker() throws URISyntaxException, JMSException {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://myBroker2?broker.persistent=false");
+        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(
+            "vm://myBroker2?broker.persistent=false&broker.useJmx=false");
         // Make sure the broker is not created until the connection is
         // instantiated.
         assertNull(BrokerRegistry.getInstance().lookup("myBroker2"));
@@ -120,7 +129,8 @@ public class ActiveMQConnectionFactoryTest extends CombinationTestSupport {
     }
 
     public void testGetBrokerName() throws URISyntaxException, JMSException {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
+        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(
+            "vm://localhost?broker.persistent=false&broker.useJmx=false");
         connection = (ActiveMQConnection)cf.createConnection();
         connection.start();
 
@@ -141,6 +151,7 @@ public class ActiveMQConnectionFactoryTest extends CombinationTestSupport {
     public void testCreateTcpConnectionUsingKnownLocalPort() throws Exception {
         broker = new BrokerService();
         broker.setPersistent(false);
+        broker.setUseJmx(false);
         broker.addConnector("tcp://localhost:61610?wireFormat.tcpNoDelayEnabled=true");
         broker.start();
 
@@ -236,6 +247,8 @@ public class ActiveMQConnectionFactoryTest extends CombinationTestSupport {
         broker = new BrokerService();
         broker.setPersistent(false);
         broker.setUseJmx(false);
+        broker.setAdvisorySupport(false);
+        broker.setSchedulerSupport(false);
         TransportConnector connector = broker.addConnector(uri);
         broker.start();