Fix tenant deletion tests
This commit is contained in:
parent
3803081b57
commit
c06c826329
@ -323,8 +323,10 @@ public class NotificationApiTest extends AbstractNotificationApiTest {
|
||||
|
||||
deleteDifferentTenant();
|
||||
|
||||
assertThat(notificationRequestService.findNotificationRequestsByTenantIdAndOriginatorType(tenantId, EntityType.USER, new PageLink(1)).getTotalElements())
|
||||
.isZero();
|
||||
await().atMost(TIMEOUT, TimeUnit.SECONDS).untilAsserted(() -> {
|
||||
assertThat(notificationRequestService.findNotificationRequestsByTenantIdAndOriginatorType(tenantId, EntityType.USER, new PageLink(1)).getTotalElements())
|
||||
.isZero();
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@ -38,8 +38,10 @@ import org.thingsboard.server.dao.service.DaoSqlTest;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.awaitility.Awaitility.await;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
@ -148,7 +150,9 @@ public class NotificationTargetApiTest extends AbstractNotificationApiTest {
|
||||
assertThat(notificationTargetDao.findByTenantIdAndSupportedNotificationTypeAndPageLink(differentTenantId, NotificationType.GENERAL, new PageLink(10)).getData()).isNotEmpty();
|
||||
|
||||
deleteDifferentTenant();
|
||||
assertThat(notificationTargetDao.findByTenantIdAndPageLink(differentTenantId, new PageLink(10)).getData()).isEmpty();
|
||||
await().atMost(TIMEOUT, TimeUnit.SECONDS).untilAsserted(() -> {
|
||||
assertThat(notificationTargetDao.findByTenantIdAndPageLink(differentTenantId, new PageLink(10)).getData()).isEmpty();
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user