|
|
|
@ -23,6 +23,7 @@ import org.thingsboard.server.common.data.DataConstants; |
|
|
|
import org.thingsboard.server.common.data.TenantProfile; |
|
|
|
import org.thingsboard.server.common.data.queue.ProcessingStrategy; |
|
|
|
import org.thingsboard.server.common.data.queue.ProcessingStrategyType; |
|
|
|
import org.thingsboard.server.common.data.queue.Queue; |
|
|
|
import org.thingsboard.server.common.data.queue.SubmitStrategy; |
|
|
|
import org.thingsboard.server.common.data.queue.SubmitStrategyType; |
|
|
|
import org.thingsboard.server.common.data.tenant.profile.TenantProfileQueueConfiguration; |
|
|
|
@ -84,10 +85,11 @@ public class TenantProfileEdgeTest extends AbstractEdgeTest { |
|
|
|
Optional<TenantProfileUpdateMsg> tenantProfileUpdateMsgOpt = edgeImitator.findMessageByType(TenantProfileUpdateMsg.class); |
|
|
|
Assert.assertTrue(tenantProfileUpdateMsgOpt.isPresent()); |
|
|
|
TenantProfileUpdateMsg tenantProfileUpdateMsg = tenantProfileUpdateMsgOpt.get(); |
|
|
|
TenantProfile tenantProfile = JacksonUtil.fromStringIgnoreUnknownProperties(tenantProfileUpdateMsg.getEntity(), TenantProfile.class); |
|
|
|
Assert.assertNotNull(tenantProfile); |
|
|
|
Assert.assertEquals(UpdateMsgType.ENTITY_UPDATED_RPC_MESSAGE, tenantProfileUpdateMsg.getMsgType()); |
|
|
|
Assert.assertEquals(edgeTenantProfile.getUuidId().getMostSignificantBits(), tenantProfileUpdateMsg.getIdMSB()); |
|
|
|
Assert.assertEquals(edgeTenantProfile.getUuidId().getLeastSignificantBits(), tenantProfileUpdateMsg.getIdLSB()); |
|
|
|
Assert.assertEquals(edgeTenantProfile.getDescription(), tenantProfileUpdateMsg.getDescription()); |
|
|
|
Assert.assertEquals(edgeTenantProfile.getId(), tenantProfile.getId()); |
|
|
|
Assert.assertEquals(edgeTenantProfile.getDescription(), tenantProfile.getDescription()); |
|
|
|
|
|
|
|
List<QueueUpdateMsg> queueUpdateMsgs = edgeImitator.findAllMessagesByType(QueueUpdateMsg.class); |
|
|
|
Assert.assertEquals(2, queueUpdateMsgs.size()); |
|
|
|
@ -104,8 +106,9 @@ public class TenantProfileEdgeTest extends AbstractEdgeTest { |
|
|
|
queueUpdateMsgs = edgeImitator.findAllMessagesByType(QueueUpdateMsg.class); |
|
|
|
Assert.assertEquals(2, queueUpdateMsgs.size()); |
|
|
|
for (QueueUpdateMsg queueUpdateMsg : queueUpdateMsgs) { |
|
|
|
Assert.assertEquals(tenantId.getId().getMostSignificantBits(), queueUpdateMsg.getTenantIdMSB()); |
|
|
|
Assert.assertEquals(tenantId.getId().getLeastSignificantBits(), queueUpdateMsg.getTenantIdLSB()); |
|
|
|
Queue queue = JacksonUtil.fromStringIgnoreUnknownProperties(queueUpdateMsg.getEntity(), Queue.class); |
|
|
|
Assert.assertNotNull(queue); |
|
|
|
Assert.assertEquals(tenantId, queue.getTenantId()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|