removing illegal wildcard characters used in topics for some MQTT tests
This commit is contained in:
Christopher L. Shannon (cshannon) 2016-02-29 13:29:44 +00:00
parent 1b38b27ed2
commit 19c9404916
2 changed files with 4 additions and 2 deletions

View File

@ -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();

View File

@ -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 {