jbertram commented on code in PR #4710:
URL: https://github.com/apache/activemq-artemis/pull/4710#discussion_r1469885121
##########
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/MQTT5Test.java:
##########
@@ -83,6 +83,29 @@ public void messageArrived(String topic, MqttMessage
message) {
assertTrue(latch.await(500, TimeUnit.MILLISECONDS));
}
+ @Test(timeout = DEFAULT_TIMEOUT)
+ public void testTopicNameEscape() throws Exception {
+ final String topic = "foo1.0/bar/baz";
+
+ CountDownLatch latch = new CountDownLatch(1);
+ MqttClient subscriber = createPahoClient("subscriber");
+ subscriber.connect();
+ subscriber.setCallback(new DefaultMqttCallback() {
+ @Override
+ public void messageArrived(String t, MqttMessage message) {
+ logger.info("Message received from topic {}, message={}", topic,
message);
+ assertEquals(topic, t);
Review Comment:
Good call.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]