Skip to content

Commit

Permalink
feat(engine): Assert for instance and definitionid in job
Browse files Browse the repository at this point in the history
related to camunda#4205
  • Loading branch information
punitdarira committed Jul 9, 2024
1 parent 100fa5b commit bd1c38d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1165,10 +1165,13 @@ public void shouldSetProcessInstanceAndDefinitionIdInHistoryJobLog() {
.processInstanceIds(processInstance.getId())
.executeAsync();
helper.executeSeedJob(batch);
List<Job> 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);
Expand Down

0 comments on commit bd1c38d

Please sign in to comment.