From 540bbce0bbc82b71ace58472c2775381e1df49aa Mon Sep 17 00:00:00 2001 From: manan164 <1897158+manan164@users.noreply.github.com> Date: Thu, 20 Jun 2024 12:52:25 +0530 Subject: [PATCH] Sub workflow sync test fix. Since the ordering of the task can be different. The integration_task_2 will be polled and completed. --- .../HierarchicalForkJoinSubworkflowRetrySpec.groovy | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test-harness/src/test/groovy/com/netflix/conductor/test/integration/HierarchicalForkJoinSubworkflowRetrySpec.groovy b/test-harness/src/test/groovy/com/netflix/conductor/test/integration/HierarchicalForkJoinSubworkflowRetrySpec.groovy index c272e8637..916c34be8 100644 --- a/test-harness/src/test/groovy/com/netflix/conductor/test/integration/HierarchicalForkJoinSubworkflowRetrySpec.groovy +++ b/test-harness/src/test/groovy/com/netflix/conductor/test/integration/HierarchicalForkJoinSubworkflowRetrySpec.groovy @@ -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" @@ -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)) {