|
|
|
@ -41,6 +41,7 @@ import org.thingsboard.mqtt.MqttClient; |
|
|
|
import org.thingsboard.mqtt.MqttClientCallback; |
|
|
|
import org.thingsboard.mqtt.MqttClientConfig; |
|
|
|
import org.thingsboard.mqtt.MqttHandler; |
|
|
|
import org.thingsboard.server.common.data.DataConstants; |
|
|
|
import org.thingsboard.server.common.data.Device; |
|
|
|
import org.thingsboard.server.common.data.DeviceProfile; |
|
|
|
import org.thingsboard.server.common.data.DeviceProfileProvisionType; |
|
|
|
@ -249,7 +250,7 @@ public class MqttClientTest extends AbstractContainerTest { |
|
|
|
sharedAttributes.addProperty(sharedAttributeName, sharedAttributeValue); |
|
|
|
JsonNode sharedAttribute = mapper.readTree(sharedAttributes.toString()); |
|
|
|
|
|
|
|
testRestClient.postTelemetryAttribute(DEVICE, device.getId(), SHARED_SCOPE, sharedAttribute); |
|
|
|
testRestClient.postTelemetryAttribute(DataConstants.DEVICE, device.getId(), SHARED_SCOPE, sharedAttribute); |
|
|
|
|
|
|
|
MqttEvent event = listener.getEvents().poll(10 * timeoutMultiplier, TimeUnit.SECONDS); |
|
|
|
assertThat(mapper.readValue(Objects.requireNonNull(event).getMessage(), JsonNode.class).get(sharedAttributeName).asText()) |
|
|
|
|