activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject git commit: Add an option to allow test cases to easily change the transformer instance used by the AmqpProtocolConverter.
Date Wed, 14 May 2014 17:02:42 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk 38a86b470 -> 8f3e08c7b


Add an option to allow test cases to easily change the transformer
instance used by the AmqpProtocolConverter.

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

Branch: refs/heads/trunk
Commit: 8f3e08c7b66571f2b2247c0fe35a4bb9a8dd3ce9
Parents: 38a86b4
Author: Timothy Bish <tabish121@gmail.com>
Authored: Wed May 14 13:02:28 2014 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Wed May 14 13:02:28 2014 -0400

----------------------------------------------------------------------
 .../activemq/transport/amqp/AmqpTestSupport.java    | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/8f3e08c7/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTestSupport.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTestSupport.java
b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTestSupport.java
index 6f1c31a..e24412d 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTestSupport.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTestSupport.java
@@ -124,22 +124,26 @@ public class AmqpTestSupport {
         TransportConnector connector = null;
 
         if (isUseTcpConnector()) {
-            connector = brokerService.addConnector("amqp://0.0.0.0:" + port);
+            connector = brokerService.addConnector(
+                "amqp://0.0.0.0:" + port + "?transport.transformer=" + getAmqpTransformer());
             port = connector.getConnectUri().getPort();
             LOG.debug("Using amqp port " + port);
         }
         if (isUseSslConnector()) {
-            connector = brokerService.addConnector("amqp+ssl://0.0.0.0:" + sslPort);
+            connector = brokerService.addConnector(
+                "amqp+ssl://0.0.0.0:" + sslPort + "?transport.transformer=" + getAmqpTransformer());
             sslPort = connector.getConnectUri().getPort();
             LOG.debug("Using amqp+ssl port " + sslPort);
         }
         if (isUseNioConnector()) {
-            connector = brokerService.addConnector("amqp+nio://0.0.0.0:" + nioPort);
+            connector = brokerService.addConnector(
+                "amqp+nio://0.0.0.0:" + nioPort + "?transport.transformer=" + getAmqpTransformer());
             nioPort = connector.getConnectUri().getPort();
             LOG.debug("Using amqp+nio port " + nioPort);
         }
         if (isUseNioPlusSslConnector()) {
-            connector = brokerService.addConnector("amqp+nio+ssl://0.0.0.0:" + nioPlusSslPort);
+            connector = brokerService.addConnector(
+                "amqp+nio+ssl://0.0.0.0:" + nioPlusSslPort + "?transport.transformer=" +
getAmqpTransformer());
             nioPlusSslPort = connector.getConnectUri().getPort();
             LOG.debug("Using amqp+nio+ssl port " + nioPlusSslPort);
         }
@@ -161,6 +165,10 @@ public class AmqpTestSupport {
         return false;
     }
 
+    protected String getAmqpTransformer() {
+        return "jms";
+    }
+
     public void startBroker() throws Exception {
         if (brokerService != null) {
             throw new IllegalStateException("Broker is already created.");


Mime
View raw message