This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects

audit event failed tests

Merged Philipp Gritsch requested to merge audit-event-failed-test into development
Viewing commit 30b00d9d
Show latest version
1 file
+ 1
16
Compare changes
  • Side-by-side
  • Inline
@@ -166,22 +166,7 @@ public class AuditEventServiceIT {
assertThat(persistenceAuditEventRepository.findAll().size()).isEqualTo(currentAuditLogs + auditEventsOld.size() + 2);
isolatedTransactionTemplate.execute(
new TransactionCallback<Boolean>() {
@Override
public Boolean doInTransaction(TransactionStatus status) {
log.info("Saved {} outdated AuditEvents", MAX_OUTDATEDVALUES);
assertThat(persistenceAuditEventRepository.findAll().size()).isGreaterThan(MAX_OUTDATEDVALUES);
log.info("Removing outdated AuditEvents");
int count = auditEventService.removeOldAuditEvents();
// persistenceAuditEventRepository.flush();
log.info("Removed {} outdated AuditEvents", count);
return true;
}
}
);
this.auditEventService.removeOldAuditEvents2();
assertThat(persistenceAuditEventRepository.findAll().size()).isEqualTo(currentAuditLogs + 2);
assertThat(persistenceAuditEventRepository.findByPrincipal("test-user-old")).isEmpty();