test: count entities by query adjusted due to the loop relations in hierarchy
This commit is contained in:
parent
e4f8c7e878
commit
d65b02df19
@ -170,7 +170,7 @@ public abstract class BaseEntityServiceTest extends AbstractServiceTest {
|
||||
EntityCountQuery countQuery = new EntityCountQuery(filter);
|
||||
|
||||
long count = entityService.countEntitiesByQuery(tenantId, new CustomerId(CustomerId.NULL_UUID), countQuery);
|
||||
Assert.assertEquals(30, count);
|
||||
Assert.assertEquals(31, count); //due to the loop relations in hierarchy, the TenantId included in total count (1*Tenant + 5*Asset + 5*5*Devices = 31)
|
||||
|
||||
filter.setFilters(Collections.singletonList(new RelationEntityTypeFilter("Contains", Collections.singletonList(EntityType.DEVICE))));
|
||||
count = entityService.countEntitiesByQuery(tenantId, new CustomerId(CustomerId.NULL_UUID), countQuery);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user