camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1096319 - /camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/CamelJmsTestHelper.java
Date Sun, 24 Apr 2011 12:25:48 GMT
Author: davsclaus
Date: Sun Apr 24 12:25:48 2011
New Revision: 1096319

URL: http://svn.apache.org/viewvc?rev=1096319&view=rev
Log:
Optimized AMQ for quicker unit tests.

Modified:
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/CamelJmsTestHelper.java

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/CamelJmsTestHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/CamelJmsTestHelper.java?rev=1096319&r1=1096318&r2=1096319&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/CamelJmsTestHelper.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/CamelJmsTestHelper.java
Sun Apr 24 12:25:48 2011
@@ -46,6 +46,12 @@ public final class CamelJmsTestHelper {
             url = url + "&" + options;
         }
         ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(url);
+        // optimize AMQ to be as fast as possible so unit testing is quicker
+        connectionFactory.setCopyMessageOnSend(false);
+        connectionFactory.setOptimizeAcknowledge(true);
+        connectionFactory.setOptimizedMessageDispatch(true);
+        connectionFactory.setUseAsyncSend(true);
+        connectionFactory.setAlwaysSessionAsync(false);
         // use a pooled connection factory
         PooledConnectionFactory pooled = new PooledConnectionFactory(connectionFactory);
         pooled.setMaxConnections(8);
@@ -64,6 +70,12 @@ public final class CamelJmsTestHelper {
             url = url + "&" + options;
         }
         ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(url);
+        // optimize AMQ to be as fast as possible so unit testing is quicker
+        connectionFactory.setCopyMessageOnSend(false);
+        connectionFactory.setOptimizeAcknowledge(true);
+        connectionFactory.setOptimizedMessageDispatch(true);
+        connectionFactory.setUseAsyncSend(true);
+        connectionFactory.setAlwaysSessionAsync(false);
 
         // use a pooled connection factory
         PooledConnectionFactory pooled = new PooledConnectionFactory(connectionFactory);



Mime
View raw message