emqx/mqtt-jmeter

MQTT Connect timeout value is ignored

frankyfish opened this issue · 2 comments

In current plugin version(2.0.2) MQTT Connect timeout value is ignored during CONNECT.

Steps to reproduce:

  1. Set some big timeout value
    image
  2. Make MQTT Broker to respond with CONNACK longer than 10 sec (default timeout value for the client)

ER
Test is able to connect to the broker even after some of waiting for response (>10sec)

AR
Test is failing with a timeout exception, see stacktrace below.
Nov 11, 2021 1:56:12 PM net.xmeter.samplers.ConnectSampler sample SEVERE: Failed to establish Connection null java.util.concurrent.ExecutionException: com.hivemq.client.mqtt.mqtt3.exceptions.Mqtt3DisconnectException: Timeout while waiting for CONNACK at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395) at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2022) at net.xmeter.samplers.mqtt.hivemq.HiveMQTTClient.connect(HiveMQTTClient.java:78) at net.xmeter.samplers.ConnectSampler.sample(ConnectSampler.java:91) at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:638) at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558) at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: com.hivemq.client.mqtt.mqtt3.exceptions.Mqtt3DisconnectException: Timeout while waiting for CONNACK
Problem comes from the fact that value from Timeout(s) field in UI is never passed to hivemq client instance and is only used for waiting a CompletableFuture with connect request to finish.

Should be fixed in PR

Hi Team,

This issue has not resolved yet for me. I am getting connection drop after 20 concurrency.
Please help on this.

Thanks,
Vishnu.