Merge branch 'develop/3.4' of github.com:thingsboard/thingsboard into feature/mqtt-tests-spead-up

This commit is contained in:
ShvaykaD 2022-05-17 10:40:16 +03:00
commit 02df48cfbe
2 changed files with 2 additions and 3 deletions

View File

@ -292,7 +292,7 @@ public class DefaultTransportApiService implements TransportApiService {
tbClusterService.onDeviceUpdated(savedDevice, null); tbClusterService.onDeviceUpdated(savedDevice, null);
device = savedDevice; device = savedDevice;
relationService.saveRelationAsync(TenantId.SYS_TENANT_ID, new EntityRelation(gateway.getId(), device.getId(), "Created")); relationService.saveRelation(TenantId.SYS_TENANT_ID, new EntityRelation(gateway.getId(), device.getId(), "Created"));
TbMsgMetaData metaData = new TbMsgMetaData(); TbMsgMetaData metaData = new TbMsgMetaData();
CustomerId customerId = gateway.getCustomerId(); CustomerId customerId = gateway.getCustomerId();

View File

@ -408,9 +408,8 @@ public class MqttGatewayClientTest extends AbstractContainerTest {
private Device createDeviceThroughGateway(MqttClient mqttClient, Device gatewayDevice) throws Exception { private Device createDeviceThroughGateway(MqttClient mqttClient, Device gatewayDevice) throws Exception {
String deviceName = "mqtt_device"; String deviceName = "mqtt_device";
mqttClient.publish("v1/gateway/connect", Unpooled.wrappedBuffer(createGatewayConnectPayload(deviceName).toString().getBytes())).get(); mqttClient.publish("v1/gateway/connect", Unpooled.wrappedBuffer(createGatewayConnectPayload(deviceName).toString().getBytes()), MqttQoS.AT_LEAST_ONCE).get();
TimeUnit.SECONDS.sleep(3);
List<EntityRelation> relations = restClient.findByFrom(gatewayDevice.getId(), RelationTypeGroup.COMMON); List<EntityRelation> relations = restClient.findByFrom(gatewayDevice.getId(), RelationTypeGroup.COMMON);
Assert.assertEquals(1, relations.size()); Assert.assertEquals(1, relations.size());