[
https://issues.apache.org/jira/browse/ARTEMIS-2686?focusedWorklogId=414531&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-414531
]
ASF GitHub Bot logged work on ARTEMIS-2686:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 02/Apr/20 08:22
Start Date: 02/Apr/20 08:22
Worklog Time Spent: 10m
Work Description: brusdev commented on pull request #3058: ARTEMIS-2686
Fix MQTT connect message rejection
URL: https://github.com/apache/activemq-artemis/pull/3058#discussion_r402134843
##########
File path:
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTRejectingInterceptorTest.java
##########
@@ -61,4 +62,36 @@ public boolean intercept(MqttMessage packet,
RemotingConnection connection) thro
subscribeProvider.disconnect();
publishProvider.disconnect();
}
+
+ @Test(timeout = 60000)
+ public void testRejectedMqttConnectMessage() throws Exception {
+
+ server.getRemotingService().addIncomingInterceptor((MQTTInterceptor)
(packet, connection) -> {
+ if (packet.getClass() == MqttConnectMessage.class) {
+ return false;
+ } else {
+ return true;
+ }
+ });
+
+ Thread publishThread = new Thread(() -> {
Review comment:
The MQTTClientProvider hasn't a connection timeout. I could remove the
thread and use the test timeout but I would lose the fail message "The
connection is stuck!".
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 414531)
Time Spent: 0.5h (was: 20m)
> Fix MQTT connect message rejection
> ----------------------------------
>
> Key: ARTEMIS-2686
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2686
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker, MQTT
> Affects Versions: 2.11.0
> Reporter: Domenico Bruscino
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> When an incoming MQTT interceptor rejects a MqttConnectMessage the connection
> doesn't close and the client gets stuck.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)