diff --git a/testing/story/src/test/java/com/evolveum/midpoint/testing/story/TestStrings.java b/testing/story/src/test/java/com/evolveum/midpoint/testing/story/TestStrings.java index 39ca236134c..161e62699af 100644 --- a/testing/story/src/test/java/com/evolveum/midpoint/testing/story/TestStrings.java +++ b/testing/story/src/test/java/com/evolveum/midpoint/testing/story/TestStrings.java @@ -1061,7 +1061,9 @@ public void test222FormApproveByCheese() throws Exception { // audit displayDumpable("audit", dummyAuditService); List records = dummyAuditService.getRecords(); - assertEquals("Wrong # of audit records", 4, records.size()); + if (records.size() != 4 && records.size() != 5) { + fail("Wrong # of audit records: " + records.size() + " (expected 4 or 5)"); + } AuditEventRecord record = records.get(0); Collection> deltas = record.getDeltas(); assertEquals("Wrong # of deltas in audit record", 1, deltas.size()); @@ -1075,6 +1077,7 @@ public void test222FormApproveByCheese() throws Exception { // record #1, #2: cancellation of work items of other approvers // record #3: finishing process execution + // optional #4: asynchronous execution in task CaseType rootCase = getCase(aCase.getParentRef().getOid()); waitForCaseClose(rootCase, CASE_WAIT_TIMEOUT);