Merge pull request #9659 from YevhenBondarenko/fix/msa-tests
blackbox tests improvements
This commit is contained in:
commit
3c90b9cf2f
@ -253,12 +253,16 @@ public class ThingsBoardDbInstaller {
|
|||||||
.add(tbVcExecutorLogVolume)
|
.add(tbVcExecutorLogVolume)
|
||||||
.add(resolveRedisComposeVolumeLog());
|
.add(resolveRedisComposeVolumeLog());
|
||||||
|
|
||||||
|
if (IS_HYBRID_MODE) {
|
||||||
|
rmVolumesCommand.add(cassandraDataVolume);
|
||||||
|
}
|
||||||
|
|
||||||
dockerCompose.withCommand(rmVolumesCommand.toString());
|
dockerCompose.withCommand(rmVolumesCommand.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private String resolveRedisComposeVolumeLog() {
|
private String resolveRedisComposeVolumeLog() {
|
||||||
if (IS_REDIS_CLUSTER) {
|
if (IS_REDIS_CLUSTER) {
|
||||||
return IntStream.range(0, 6).mapToObj(i -> redisClusterDataVolume + "-" + i).collect(Collectors.joining());
|
return IntStream.range(0, 6).mapToObj(i -> " " + redisClusterDataVolume + "-" + i).collect(Collectors.joining());
|
||||||
}
|
}
|
||||||
if (IS_REDIS_SENTINEL) {
|
if (IS_REDIS_SENTINEL) {
|
||||||
return redisSentinelDataVolume + "-" + "master " + " " +
|
return redisSentinelDataVolume + "-" + "master " + " " +
|
||||||
|
|||||||
@ -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