From 7af39213913fce693aee83e7fc6ec7132358a66c Mon Sep 17 00:00:00 2001 From: Alberto Codutti Date: Tue, 21 Jan 2025 15:10:16 +0100 Subject: [PATCH] :recycle: [Test] Added autoreconnect of Kura Device Signed-off-by: Alberto Codutti --- .../eclipse/kapua/service/device/registry/steps/KuraDevice.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/service/device/registry/test-steps/src/main/java/org/eclipse/kapua/service/device/registry/steps/KuraDevice.java b/service/device/registry/test-steps/src/main/java/org/eclipse/kapua/service/device/registry/steps/KuraDevice.java index 65076a8f0d3..d33e84f37c9 100644 --- a/service/device/registry/test-steps/src/main/java/org/eclipse/kapua/service/device/registry/steps/KuraDevice.java +++ b/service/device/registry/test-steps/src/main/java/org/eclipse/kapua/service/device/registry/steps/KuraDevice.java @@ -249,10 +249,12 @@ public void mqttClientConnect() { MqttConnectOptions clientOpts = new MqttConnectOptions(); clientOpts.setUserName(CLIENT_USER); clientOpts.setPassword(CLIENT_PASSWORD.toCharArray()); + clientOpts.setAutomaticReconnect(true); MqttConnectOptions serverOpts = new MqttConnectOptions(); serverOpts.setUserName(SERVER_USER); serverOpts.setPassword(SERVER_PASSWORD.toCharArray()); + serverOpts.setAutomaticReconnect(true); try { mqttClient.connect(clientOpts);