Skip to content

Commit 498ef00

Browse files
punitdarirayanavasileva
authored andcommitted
feat(engine): Assert for instance and definitionid in job
related to #4205
1 parent 6999d07 commit 498ef00

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

engine/src/test/java/org/camunda/bpm/engine/test/api/runtime/RestartProcessInstanceAsyncTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,10 +1165,13 @@ public void shouldSetProcessInstanceAndDefinitionIdInHistoryJobLog() {
11651165
.processInstanceIds(processInstance.getId())
11661166
.executeAsync();
11671167
helper.executeSeedJob(batch);
1168-
List<Job> executionJobs = helper.getExecutionJobs(batch);
1168+
1169+
Job executionJob = helper.getExecutionJobs(batch).get(0);
1170+
assertEquals(processInstance.getProcessDefinitionId(), executionJob.getProcessDefinitionId());
1171+
assertEquals(processInstance.getRootProcessInstanceId(), executionJob.getProcessInstanceId());
11691172

11701173
// when
1171-
helper.executeJob(executionJobs.get(0));
1174+
helper.executeJob(executionJob);
11721175

11731176
// then
11741177
HistoricJobLog jobLog = historyService.createHistoricJobLogQuery().jobDefinitionType(Batch.TYPE_PROCESS_INSTANCE_RESTART).list().get(0);

0 commit comments

Comments
 (0)