added quick test for cleanSession=false and wildcard sub for MQTT from IRC chat

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1513655 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Christian Posta 2013-08-13 21:09:40 +00:00
parent 7e28d2a948
commit 4dc1ddcd21
1 changed files with 3 additions and 2 deletions

View File

@ -92,8 +92,9 @@ public class MQTTTest extends AbstractMQTTTest {
final BlockingConnection connection = mqtt.blockingConnection();
connection.connect();
Topic[] topics = {new Topic("TopicA", QoS.EXACTLY_ONCE), new Topic("TopicB", QoS.EXACTLY_ONCE)};
connection.subscribe(topics);
Topic[] topics = {new Topic("Topic/A", QoS.EXACTLY_ONCE), new Topic("Topic/B", QoS.EXACTLY_ONCE)};
Topic[] wildcardTopic = {new Topic("Topic/#", QoS.AT_LEAST_ONCE)};
connection.subscribe(wildcardTopic);
for (Topic topic : topics) {
connection.publish(topic.name().toString(), payload, QoS.AT_LEAST_ONCE, false);