franz1981 commented on a change in pull request #3058: ARTEMIS-2686 Fix MQTT 
connect message rejection
URL: https://github.com/apache/activemq-artemis/pull/3058#discussion_r402124625
 
 

 ##########
 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:
   We really need to use a separate Thread for this?

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to