You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test case mqttClientTestWithDisabledMessageSizeCheckWithTlsAndDefaultJksStore and mqttClientTestWithDisabledMessageSizeCheckWithTlsAndP12Store create an infinite loop.
If these tests are running without an additional mosquitto process with ssl enabled (listener on port 8883 + cert, cat and key file), each of these tests will result in an infinite loop. The following error is reported multiple times:
io.joynr.messaging.mqtt.paho.client.MqttPahoClient: MQTT Connect failed. Error code 32103
Unable to connect to server (32103) - java.net.ConnectException: Connection refused (Connection refused)
The mosquitto process, which is started by the test class, listens only on port 1883.
Before running the commands, replace FULL_PATH_TO_JOYNR_SOURCES and FULL_PATH_TO_MAVEN_DIRECTORY with the right values.
The docker container can be "killed" with ctrl+c.
Run the following command for test case mqttClientTestWithDisabledMessageSizeCheckWithTlsAndDefaultJksStore:
Run mosquitto process with ssl enabled (listener on port 8883 + required files).
In my environment I copied the mosquitto.conf from /docker/joynr-base to java/messaging/mqtt/joynr-mqtt-client/src/test/resources. And modified the startBroker method of the test class to load the configuration file mosquitto.conf:
//ProcessBuilder processBuilder = new ProcessBuilder(path + "mosquitto", "-p", Integer.toString(mqttBrokerPort));
ProcessBuilder processBuilder = new ProcessBuilder(path + "mosquitto", "-c", getResourcePath("mosquitto.conf"));
The text was updated successfully, but these errors were encountered:
rendner
changed the title
Java: MqttPahoClientTest::mqttClientTestWithDisabledMessageSizeCheckWithTlsAndDefaultJksStore
Java: MqttPahoClientTest::mqttClientTestWithDisabledMessageSizeCheckWithTlsAndDefaultJksStore can result in an endless loop
Sep 2, 2018
rendner
changed the title
Java: MqttPahoClientTest::mqttClientTestWithDisabledMessageSizeCheckWithTlsAndDefaultJksStore can result in an endless loop
Java: two test cases in MqttPahoClientTest result in an infinite loop
Sep 8, 2018
I can confirm that this problem is now solved with these changes. The mentioned tests run fine if the required resources are available --> #30. If not the test now only fails with a NullPointerException and doesn't cause an infinite loop.
Problem
Test case
mqttClientTestWithDisabledMessageSizeCheckWithTlsAndDefaultJksStore
andmqttClientTestWithDisabledMessageSizeCheckWithTlsAndP12Store
create an infinite loop.If these tests are running without an additional mosquitto process with ssl enabled (listener on port 8883 + cert, cat and key file), each of these tests will result in an infinite loop. The following error is reported multiple times:
The mosquitto process, which is started by the test class, listens only on port 1883.
All users which follow this example Building joynr Java and common components will run into this problem. The problem described here is part of this problem: Building joynr Java failed
Steps to reproduce
Before running the commands, replace
FULL_PATH_TO_JOYNR_SOURCES
andFULL_PATH_TO_MAVEN_DIRECTORY
with the right values.The docker container can be "killed" with
ctrl+c
.mqttClientTestWithDisabledMessageSizeCheckWithTlsAndDefaultJksStore
:mqttClientTestWithDisabledMessageSizeCheckWithTlsAndP12Store
:Solution
Run mosquitto process with ssl enabled (listener on port 8883 + required files).
In my environment I copied the
mosquitto.conf
from/docker/joynr-base
tojava/messaging/mqtt/joynr-mqtt-client/src/test/resources
. And modified thestartBroker
method of the test class to load the configuration filemosquitto.conf
:The text was updated successfully, but these errors were encountered: