fixed fluky tests
This commit is contained in:
parent
f5cf840838
commit
9abfd128ae
@ -26,6 +26,7 @@ import io.netty.buffer.Unpooled;
|
|||||||
import io.netty.handler.codec.mqtt.MqttQoS;
|
import io.netty.handler.codec.mqtt.MqttQoS;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.awaitility.Awaitility;
|
||||||
import org.testng.annotations.AfterMethod;
|
import org.testng.annotations.AfterMethod;
|
||||||
import org.testng.annotations.BeforeMethod;
|
import org.testng.annotations.BeforeMethod;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
@ -337,8 +338,12 @@ public class MqttClientTest extends AbstractContainerTest {
|
|||||||
MqttClient mqttClient = getMqttClient(deviceCredentials, listener);
|
MqttClient mqttClient = getMqttClient(deviceCredentials, listener);
|
||||||
|
|
||||||
testRestClient.deleteDeviceIfExists(device.getId());
|
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
|
@Test
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user