[ 
https://issues.apache.org/jira/browse/ARTEMIS-4532?focusedWorklogId=901024&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-901024
 ]

ASF GitHub Bot logged work on ARTEMIS-4532:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Jan/24 19:44
            Start Date: 22/Jan/24 19:44
    Worklog Time Spent: 10m 
      Work Description: jbertram commented on code in PR #4710:
URL: https://github.com/apache/activemq-artemis/pull/4710#discussion_r1462335068


##########
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/spec/controlpackets/PublishTests.java:
##########
@@ -311,15 +312,15 @@ public void testRetainFlagFalse() throws Exception {
 
       // send retained message
       producer.publish(TOPIC, RETAINED_PAYLOAD.getBytes(), 2, true);
-      Wait.assertTrue(() -> 
server.locateQueue(MQTTUtil.convertMqttTopicFilterToCore(MQTTUtil.MQTT_RETAIN_ADDRESS_PREFIX,
 TOPIC, MQTTUtil.MQTT_WILDCARD)).getMessageCount() == 1, 1000, 100);
+      Wait.assertTrue(() -> getRetainedMessageQueue(TOPIC).getMessageCount() 
== 1, 1000, 100);
 
       // send an unretained message; should *not* remove the existing retained 
message
       producer.publish(TOPIC, UNRETAINED_PAYLOAD.getBytes(), 2, false);
 
       producer.disconnect();
       producer.close();
 
-      Wait.assertFalse(() -> 
server.locateQueue(MQTTUtil.convertMqttTopicFilterToCore(MQTTUtil.MQTT_RETAIN_ADDRESS_PREFIX,
 TOPIC, MQTTUtil.MQTT_WILDCARD)).getMessageCount() > 1, 1000, 100);
+      Wait.assertFalse(() -> getRetainedMessageQueue(TOPIC).getMessageCount() 
> 1, 1000, 100);

Review Comment:
   If we just check for 2 and the count is somehow 3 or more then the check 
will pass even though the behavior is wrong.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 901024)
    Time Spent: 50m  (was: 40m)

> MQTT-to-core wildcard conversion is broken
> ------------------------------------------
>
>                 Key: ARTEMIS-4532
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4532
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Currently when an MQTT topic filter contains characters from the configured 
> [wildcard 
> syntax|https://activemq.apache.org/components/artemis/documentation/latest/wildcard-syntax.html#wildcard-syntax]
>  the conversion to/from this syntax breaks.
> For example, when using the default wildcard syntax if an MQTT topic filter 
> contains a {{.}} the conversion from the MQTT wildcard syntax to the core 
> wildcard syntax and back will result in the {{.}} being replaced with a {{/}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to