Browse Source
Merge pull request #14199 from dashevchenko/testBulkImportDeviceWithJsonAttr
Fixed flaky test
pull/14221/head
Viacheslav Klimov
11 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
1 deletions
-
application/src/test/java/org/thingsboard/server/controller/DeviceControllerTest.java
|
|
|
@ -1638,7 +1638,8 @@ public class DeviceControllerTest extends AbstractControllerTest { |
|
|
|
Assert.assertEquals(deviceName, savedDevice.getName()); |
|
|
|
Assert.assertEquals(deviceType, savedDevice.getType()); |
|
|
|
|
|
|
|
Optional<AttributeKvEntry> retrieved = attributesService.find(tenantId, savedDevice.getId(), AttributeScope.SERVER_SCOPE, "attr").get(); |
|
|
|
Optional<AttributeKvEntry> retrieved = await().atMost(5, TimeUnit.SECONDS) |
|
|
|
.until(() -> attributesService.find(tenantId, savedDevice.getId(), AttributeScope.SERVER_SCOPE, "attr").get(), Optional::isPresent); |
|
|
|
assertThat(retrieved.get().getJsonValue().get()).isEqualTo(deviceAttr); |
|
|
|
assertThat(retrieved.get().getStrValue()).isNotPresent(); |
|
|
|
} |
|
|
|
|