Skip to content

Commit

Permalink
Sub workflow sync test fix.
Browse files Browse the repository at this point in the history
Since the ordering of the task can be different. The integration_task_2 will be polled and completed.
  • Loading branch information
manan164 committed Jun 20, 2024
1 parent 6d81255 commit 540bbce
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ class HierarchicalForkJoinSubworkflowRetrySpec extends AbstractSpecification {
tasks[3].status == Task.Status.IN_PROGRESS
}

when: "poll and complete the integration_task_1 task"
when: "poll and complete the integration_task_2 task"
def pollAndCompleteTask = workflowTestUtil.pollAndCompleteTask('integration_task_2', 'task2.integration.worker', ['op': 'task2.done'])

then: "verify that the 'integration_task_1' was polled and acknowledged"
then: "verify that the 'integration_task_2' was polled and acknowledged"
verifyPolledAndAcknowledgedTask(pollAndCompleteTask)

then: "verify that the 'sub_workflow_task' is in a IN_PROGRESS state"
Expand All @@ -106,6 +106,12 @@ class HierarchicalForkJoinSubworkflowRetrySpec extends AbstractSpecification {
tasks.size() == 4
}

when: "poll and complete the integration_task_2 task"
pollAndCompleteTask = workflowTestUtil.pollAndCompleteTask('integration_task_2', 'task2.integration.worker', ['op': 'task2.done'])

then: "verify that the 'integration_task_2' was polled and acknowledged"
verifyPolledAndAcknowledgedTask(pollAndCompleteTask)

and: "verify that the mid-level workflow is RUNNING, and first task is in SCHEDULED state"
midLevelWorkflowId = rootWorkflowInstance.tasks[1].subWorkflowId
with(workflowExecutionService.getExecutionStatus(midLevelWorkflowId, true)) {
Expand Down

0 comments on commit 540bbce

Please sign in to comment.