From bd1c38d1529d946af3bde7837383693d07d8fbd5 Mon Sep 17 00:00:00 2001 From: Punit Darira Date: Tue, 9 Jul 2024 15:21:41 -0400 Subject: [PATCH] feat(engine): Assert for instance and definitionid in job related to #4205 --- .../test/api/runtime/RestartProcessInstanceAsyncTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/engine/src/test/java/org/camunda/bpm/engine/test/api/runtime/RestartProcessInstanceAsyncTest.java b/engine/src/test/java/org/camunda/bpm/engine/test/api/runtime/RestartProcessInstanceAsyncTest.java index 1677179a4f5..5a7d374eb49 100644 --- a/engine/src/test/java/org/camunda/bpm/engine/test/api/runtime/RestartProcessInstanceAsyncTest.java +++ b/engine/src/test/java/org/camunda/bpm/engine/test/api/runtime/RestartProcessInstanceAsyncTest.java @@ -1165,10 +1165,13 @@ public void shouldSetProcessInstanceAndDefinitionIdInHistoryJobLog() { .processInstanceIds(processInstance.getId()) .executeAsync(); helper.executeSeedJob(batch); - List executionJobs = helper.getExecutionJobs(batch); + + Job executionJob = helper.getExecutionJobs(batch).get(0); + assertEquals(processInstance.getProcessDefinitionId(), executionJob.getProcessDefinitionId()); + assertEquals(processInstance.getRootProcessInstanceId(), executionJob.getProcessInstanceId()); // when - helper.executeJob(executionJobs.get(0)); + helper.executeJob(executionJob); // then HistoricJobLog jobLog = historyService.createHistoricJobLogQuery().jobDefinitionType(Batch.TYPE_PROCESS_INSTANCE_RESTART).list().get(0);