|
|
@ -407,20 +407,15 @@ public class TenantProfileControllerTest extends AbstractControllerTest { |
|
|
testBroadcastEntityStateChangeEventNeverTenantProfile(); |
|
|
testBroadcastEntityStateChangeEventNeverTenantProfile(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void awaitAuditLog(String awaitMessage, TenantProfileId tenantProfileId, ActionType expectedAction) throws Exception { |
|
|
private void awaitAuditLog(String awaitMessage, TenantProfileId tenantProfileId, ActionType expectedAction) { |
|
|
Awaitility.await(awaitMessage) |
|
|
Awaitility.await(awaitMessage) |
|
|
.atMost(TIMEOUT, TimeUnit.SECONDS) |
|
|
.atMost(TIMEOUT, TimeUnit.SECONDS) |
|
|
.until(() -> |
|
|
.until(() -> doGetTypedWithTimePageLink( |
|
|
doGetTypedWithTimePageLink( |
|
|
"/api/audit/logs?", |
|
|
"/api/audit/logs/entity/TENANT_PROFILE/" + tenantProfileId.getId() + "?", |
|
|
new TypeReference<PageData<AuditLog>>() {}, |
|
|
new TypeReference<PageData<AuditLog>>() { |
|
|
new TimePageLink(100)).getData().stream() |
|
|
}, |
|
|
.anyMatch(log -> log.getEntityId().equals(tenantProfileId) && log.getActionType() == expectedAction) |
|
|
new TimePageLink(5)) |
|
|
|
|
|
.getData() |
|
|
|
|
|
.stream() |
|
|
|
|
|
.anyMatch(log -> log.getActionType() == expectedAction) |
|
|
|
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private TenantProfile createTenantProfile(String name) { |
|
|
private TenantProfile createTenantProfile(String name) { |
|
|
|