Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sub workflow sync test fix. #190

Merged
merged 2 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading