Quantcast

[1/2] activemq-artemis git commit: This closes #1280

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[1/2] activemq-artemis git commit: This closes #1280

clebertsuconic-2
Repository: activemq-artemis
Updated Branches:
  refs/heads/master cc81cdf45 -> c7ca49445


This closes #1280


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

Branch: refs/heads/master
Commit: c7ca494458c89dd0d551276b7f941a6eac80228e
Parents: cc81cdf 4f1308d
Author: Clebert Suconic <[hidden email]>
Authored: Thu May 18 09:31:07 2017 -0400
Committer: Clebert Suconic <[hidden email]>
Committed: Thu May 18 09:31:07 2017 -0400

----------------------------------------------------------------------
 .../artemis/protocol/amqp/broker/AMQPMessage.java       |  3 ++-
 .../tests/integration/amqp/AmqpMessageDivertsTest.java  | 12 +++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[2/2] activemq-artemis git commit: ARTEMIS-1173: Don't set routing type if null

clebertsuconic-2
ARTEMIS-1173: Don't set routing type if null


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

Branch: refs/heads/master
Commit: 4f1308d2f0e54ab1f4187c9493263f887c624363
Parents: cc81cdf
Author: Ulf Lilleengen <[hidden email]>
Authored: Thu May 18 12:38:33 2017 +0200
Committer: Clebert Suconic <[hidden email]>
Committed: Thu May 18 09:31:07 2017 -0400

----------------------------------------------------------------------
 .../artemis/protocol/amqp/broker/AMQPMessage.java       |  3 ++-
 .../tests/integration/amqp/AmqpMessageDivertsTest.java  | 12 +++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4f1308d2/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java
index d447ecd..db39c06 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java
@@ -279,8 +279,9 @@ public class AMQPMessage extends RefCountMessage {
       parseHeaders();
       if (routingType == null) {
          removeSymbol(AMQPMessageSupport.ROUTING_TYPE);
+      } else {
+         setSymbol(AMQPMessageSupport.ROUTING_TYPE, routingType.getType());
       }
-      setSymbol(AMQPMessageSupport.ROUTING_TYPE, routingType.getType());
       return this;
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4f1308d2/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpMessageDivertsTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpMessageDivertsTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpMessageDivertsTest.java
index f895c86..ed7b110 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpMessageDivertsTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpMessageDivertsTest.java
@@ -18,6 +18,7 @@ package org.apache.activemq.artemis.tests.integration.amqp;
 
 import java.util.concurrent.TimeUnit;
 
+import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
 import org.apache.activemq.artemis.api.core.RoutingType;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.server.DivertConfigurationRoutingType;
@@ -32,10 +33,19 @@ public class AmqpMessageDivertsTest extends AmqpClientTestSupport {
 
    @Test(timeout = 60000)
    public void testQueueReceiverReadMessageWithDivert() throws Exception {
+      runQueueReceiverReadMessageWithDivert(DivertConfigurationRoutingType.ANYCAST.toString());
+   }
+
+   @Test(timeout = 60000)
+   public void testQueueReceiverReadMessageWithDivertDefaultRouting() throws Exception {
+      runQueueReceiverReadMessageWithDivert(ActiveMQDefaultConfiguration.getDefaultDivertRoutingType());
+   }
+
+   public void runQueueReceiverReadMessageWithDivert(String routingType) throws Exception {
       final String forwardingAddress = getQueueName() + "Divert";
       final SimpleString simpleForwardingAddress = SimpleString.toSimpleString(forwardingAddress);
       server.createQueue(simpleForwardingAddress, RoutingType.ANYCAST, simpleForwardingAddress, null, true, false);
-      server.getActiveMQServerControl().createDivert("name", "routingName", getQueueName(), forwardingAddress, true, null, null, DivertConfigurationRoutingType.ANYCAST.toString());
+      server.getActiveMQServerControl().createDivert("name", "routingName", getQueueName(), forwardingAddress, true, null, null, routingType);
 
       sendMessages(getQueueName(), 1);
 

Loading...