Skip to content

Commit

Permalink
feat(engine): Tests
Browse files Browse the repository at this point in the history
related to #4205
  • Loading branch information
punitdarira authored and yanavasileva committed Sep 4, 2024
1 parent 8e6ccd2 commit 5e76899
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ public void shouldSetRemovalTimeForBatch_MultipleInvocationsPerBatchJob() {
}

@Test
public void shouldCreateProcessInstanceRelatedBatchJobsForSingleInvocations() {
public void testRemovalTimeProcess_shouldCreateProcessInstanceRelatedBatchJobsForSingleInvocations() {
// given
testRule.getProcessEngineConfiguration().setInvocationsPerBatchJob(1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,20 @@ public void testBatchActivationById() {
// when
Batch suspendprocess = runtimeService.updateProcessInstanceSuspensionState().byProcessInstanceIds(Arrays.asList(processInstance1.getId(), processInstance2.getId())).suspendAsync();
helper.completeSeedJobs(suspendprocess);

//Making sure that processInstanceId is set in execution jobs #4205
assertThat(helper.getExecutionJobs(suspendprocess))
.extracting("processInstanceId")
.containsExactlyInAnyOrder(processInstance1.getId(), processInstance2.getId());

helper.executeJobs(suspendprocess);
Batch activateprocess = runtimeService.updateProcessInstanceSuspensionState().byProcessInstanceIds(Arrays.asList(processInstance1.getId(), processInstance2.getId())).activateAsync();
helper.completeSeedJobs(activateprocess);

//Making sure that processInstanceId is set in execution jobs #4205
assertThat(helper.getExecutionJobs(activateprocess))
.extracting("processInstanceId")
.containsExactlyInAnyOrder(processInstance1.getId(), processInstance2.getId());
helper.executeJobs(activateprocess);


Expand Down

0 comments on commit 5e76899

Please sign in to comment.