You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/04/02 08:03:57 UTC
[GitHub] [activemq-artemis] franz1981 commented on a change in pull request
#3058: ARTEMIS-2686 Fix MQTT connect message rejection
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:
users@infra.apache.org
With regards,
Apache Git Services