added await to make tests more stable
This commit is contained in:
parent
56c65f249d
commit
1c724df353
@ -727,8 +727,13 @@ public class EntityQueryControllerTest extends AbstractControllerTest {
|
||||
}
|
||||
|
||||
private void checkEntitiesCount(EntityCountQuery query, int expectedNumOfDevices) {
|
||||
Awaitility.await()
|
||||
.alias("count by query")
|
||||
.atMost(30, TimeUnit.SECONDS)
|
||||
.until(() -> {
|
||||
var count = doPost("/api/entitiesQuery/count", query, Integer.class);
|
||||
assertThat(count).isEqualTo(expectedNumOfDevices);
|
||||
return count == expectedNumOfDevices;
|
||||
});
|
||||
}
|
||||
|
||||
private KeyFilter getEntityFieldStringEqualToKeyFilter(String keyName, String value) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user