Repository: activemq Updated Branches: refs/heads/master 1b38b27ed -> 19c940491
https://issues.apache.org/jira/browse/AMQ-5882 removing illegal wildcard characters used in topics for some MQTT tests Project: http://git-wip-us.apache.org/repos/asf/activemq/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/19c94049 Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/19c94049 Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/19c94049 Branch: refs/heads/master Commit: 19c9404916e83abac2eb630e416e16c3218c621b Parents: 1b38b27 Author: Christopher L. Shannon (cshannon) <[email protected]> Authored: Mon Feb 29 13:29:44 2016 +0000 Committer: Christopher L. Shannon (cshannon) <[email protected]> Committed: Mon Feb 29 13:29:44 2016 +0000 ---------------------------------------------------------------------- .../activemq/transport/mqtt/MQTTOverlapedSubscriptionsTest.java | 2 +- .../java/org/apache/activemq/transport/mqtt/MQTTTestSupport.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq/blob/19c94049/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTOverlapedSubscriptionsTest.java ---------------------------------------------------------------------- diff --git a/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTOverlapedSubscriptionsTest.java b/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTOverlapedSubscriptionsTest.java index 33fb61b..6d75ab7 100644 --- a/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTOverlapedSubscriptionsTest.java +++ b/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTOverlapedSubscriptionsTest.java @@ -98,7 +98,7 @@ public class MQTTOverlapedSubscriptionsTest { //Unsubscribe and resubscribe connectionSub.unsubscribe(new String[]{subscribe}); connectionSub.subscribe(topics); - connectionPub.publish(subscribe, payload.getBytes(), QoS.AT_LEAST_ONCE, false); + connectionPub.publish("test/1", payload.getBytes(), QoS.AT_LEAST_ONCE, false); receive(connectionSub, 3000); connectionPub.disconnect(); http://git-wip-us.apache.org/repos/asf/activemq/blob/19c94049/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTestSupport.java ---------------------------------------------------------------------- diff --git a/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTestSupport.java b/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTestSupport.java index 198b6c4..7e479d5 100644 --- a/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTestSupport.java +++ b/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTestSupport.java @@ -263,7 +263,9 @@ public class MQTTTestSupport { } protected String getTopicName() { - return getClass().getName() + "." + name.getMethodName(); + //wildcard characters are illegal in publish + //replace a + with something else, like _ which is allowed + return (getClass().getName() + "." + name.getMethodName()).replace("+", "_"); } protected BrokerViewMBean getProxyToBroker() throws MalformedObjectNameException, JMSException {
