@ -170,8 +170,9 @@ public class AuditLogControllerTest extends AbstractControllerTest {
savedDevice = doPost ( "/api/device" , savedDevice , Device . class ) ;
savedDevice = doPost ( "/api/device" , savedDevice , Device . class ) ;
}
}
Device finalSavedDevice = savedDevice ;
Awaitility . await ( ) . atMost ( TIMEOUT , TimeUnit . SECONDS ) . untilAsserted ( ( ) - >
Awaitility . await ( ) . atMost ( TIMEOUT , TimeUnit . SECONDS ) . untilAsserted ( ( ) - >
assertThat ( getAuditLogs ( SMALL_PAGE_SIZE , "/api/audit/logs/entity/DEVICE/" + s avedDevice. getId ( ) . getId ( ) + "?" ) ) . hasSize ( 11 + 1 ) ) ;
assertThat ( getAuditLogs ( SMALL_PAGE_SIZE , "/api/audit/logs/entity/DEVICE/" + finalS avedDevice. getId ( ) . getId ( ) + "?" ) ) . hasSize ( 11 + 1 ) ) ;
}
}
@Test
@Test
@ -187,8 +188,9 @@ public class AuditLogControllerTest extends AbstractControllerTest {
tenantProfile . setName ( tenantProfile . getName ( ) + "(old)" ) ;
tenantProfile . setName ( tenantProfile . getName ( ) + "(old)" ) ;
tenantProfile = doPost ( "/api/tenantProfile" , tenantProfile , TenantProfile . class ) ;
tenantProfile = doPost ( "/api/tenantProfile" , tenantProfile , TenantProfile . class ) ;
TenantProfile finalTenantProfile = tenantProfile ;
Awaitility . await ( ) . atMost ( TIMEOUT , TimeUnit . SECONDS ) . untilAsserted ( ( ) - >
Awaitility . await ( ) . atMost ( TIMEOUT , TimeUnit . SECONDS ) . untilAsserted ( ( ) - >
assertThat ( getAuditLogs ( SMALL_PAGE_SIZE , "/api/audit/logs/entity/" + t enantProfile. getId ( ) . getEntityType ( ) + "/" + t enantProfile. getId ( ) . getId ( ) + "?" ) )
assertThat ( getAuditLogs ( SMALL_PAGE_SIZE , "/api/audit/logs/entity/" + finalT enantProfile. getId ( ) . getEntityType ( ) + "/" + finalT enantProfile. getId ( ) . getId ( ) + "?" ) )
. as ( "Audit logs count by Tenant Profile entity" ) . hasSize ( 2 ) ) ;
. as ( "Audit logs count by Tenant Profile entity" ) . hasSize ( 2 ) ) ;
//cleanup
//cleanup