|
|
|
@ -26,6 +26,7 @@ import io.netty.buffer.Unpooled; |
|
|
|
import io.netty.handler.codec.mqtt.MqttQoS; |
|
|
|
import lombok.Data; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.awaitility.Awaitility; |
|
|
|
import org.testng.annotations.AfterMethod; |
|
|
|
import org.testng.annotations.BeforeMethod; |
|
|
|
import org.testng.annotations.Test; |
|
|
|
@ -337,8 +338,12 @@ public class MqttClientTest extends AbstractContainerTest { |
|
|
|
MqttClient mqttClient = getMqttClient(deviceCredentials, listener); |
|
|
|
|
|
|
|
testRestClient.deleteDeviceIfExists(device.getId()); |
|
|
|
TimeUnit.SECONDS.sleep(3 * timeoutMultiplier); |
|
|
|
assertThat(mqttClient.isConnected()).isFalse(); |
|
|
|
|
|
|
|
Awaitility |
|
|
|
.await() |
|
|
|
.alias("Check device connection.") |
|
|
|
.atMost(10, TimeUnit.SECONDS) |
|
|
|
.until(() -> !mqttClient.isConnected()); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
|