Skip to content

Commit

Permalink
Merge pull request #190 from conductor-oss/build_fix
Browse files Browse the repository at this point in the history
Sub workflow sync test fix.
  • Loading branch information
v1r3n committed Jun 20, 2024
2 parents 6d81255 + e2000cf commit 89e7a6c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ class HierarchicalForkJoinSubworkflowRerunSpec 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
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ class HierarchicalForkJoinSubworkflowRestartSpec 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
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 89e7a6c

Please sign in to comment.