use of com.evolveum.midpoint.repo.sqale.audit.SqaleAuditService in project midpoint by Evolveum.
the class SqaleAuditSearchIterativeTest method initObjects.
@BeforeClass
public void initObjects() throws Exception {
sqaleAuditService = ((AuditServiceProxy) auditService).getImplementation(SqaleAuditService.class);
performanceMonitor = sqaleAuditService.getPerformanceMonitor();
aer = QAuditEventRecordMapping.get().defaultAlias();
clearAudit();
OperationResult result = createOperationResult();
long timestamp = startTimestamp;
Random random = new Random();
// we will create two full "pages" of data
for (int i = 1; i <= ITERATION_PAGE_SIZE * 2; i++) {
AuditEventRecord record = new AuditEventRecord();
record.setParameter(paramString(i));
record.setTimestamp(timestamp);
auditService.audit(record, NullTaskImpl.INSTANCE, result);
// 50% chance to change the timestamp by up to a second
timestamp += random.nextInt(2) * random.nextInt(1000);
}
}
Aggregations