From ce31796d5bf6022b13f2463f89c33840c8407807 Mon Sep 17 00:00:00 2001 From: Martin Weiler Date: Mon, 8 May 2023 11:25:29 -0600 Subject: [PATCH] [kie-roadmap#52] Fix test, RequestInfo/ErrorInfo records are only deleted for ended process instances --- .../org/jbpm/test/functional/log/ExecutorLogCleanTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jbpm-test-coverage/src/test/java/org/jbpm/test/functional/log/ExecutorLogCleanTest.java b/jbpm-test-coverage/src/test/java/org/jbpm/test/functional/log/ExecutorLogCleanTest.java index b860bb2748..09bf7f2e3c 100644 --- a/jbpm-test-coverage/src/test/java/org/jbpm/test/functional/log/ExecutorLogCleanTest.java +++ b/jbpm-test-coverage/src/test/java/org/jbpm/test/functional/log/ExecutorLogCleanTest.java @@ -112,6 +112,9 @@ public void deleteErrorLogsByDate() throws Exception { List errorList = getExecutorService().getAllErrors(new QueryContext()); Assertions.assertThat(errorList).hasSize(2); + // Abort running process instance + ksession.abortProcessInstance(pi.getId()); + // Delete a record int resultCount = auditService.errorInfoLogDeleteBuilder() .date(errorList.get(0).getTime()) @@ -132,9 +135,6 @@ public void deleteErrorLogsByDate() throws Exception { // Assert remaining records Assertions.assertThat(getExecutorService().getAllErrors(new QueryContext())).hasSize(remaining); - - // Abort running process instance - ksession.abortProcessInstance(pi.getId()); } }