From b62b70997a2ee3be93ebee195f2c6134a5e0108f Mon Sep 17 00:00:00 2001 From: manan164 <1897158+manan164@users.noreply.github.com> Date: Mon, 10 Jun 2024 17:06:24 +0530 Subject: [PATCH] fix sub workflow tests --- .../conductor/test/integration/SubWorkflowSpec.groovy | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test-harness/src/test/groovy/com/netflix/conductor/test/integration/SubWorkflowSpec.groovy b/test-harness/src/test/groovy/com/netflix/conductor/test/integration/SubWorkflowSpec.groovy index 8bc6bbff9..d5b8cdee7 100644 --- a/test-harness/src/test/groovy/com/netflix/conductor/test/integration/SubWorkflowSpec.groovy +++ b/test-harness/src/test/groovy/com/netflix/conductor/test/integration/SubWorkflowSpec.groovy @@ -103,13 +103,11 @@ class SubWorkflowSpec extends AbstractSpecification { tasks[0].taskType == 'integration_task_1' tasks[0].status == Task.Status.COMPLETED tasks[1].taskType == 'SUB_WORKFLOW' - tasks[1].status == Task.Status.SCHEDULED + tasks[1].status == Task.Status.IN_PROGRESS } when: "the subworkflow is started by issuing a system task call" - List polledTaskIds = queueDAO.pop("SUB_WORKFLOW", 1, 200) - String subworkflowTaskId = polledTaskIds.get(0) - asyncSystemTaskExecutor.execute(subWorkflowTask, subworkflowTaskId) + String subworkflowTaskId = workflowExecutionService.getExecutionStatus(workflowInstanceId, true).getTasks().get(1).getTaskId() then: "verify that the 'sub_workflow_task' is in a IN_PROGRESS state" with(workflowExecutionService.getExecutionStatus(workflowInstanceId, true)) { @@ -251,7 +249,7 @@ class SubWorkflowSpec extends AbstractSpecification { tasks[0].taskType == 'integration_task_1' tasks[0].status == Task.Status.COMPLETED tasks[1].taskType == 'SUB_WORKFLOW' - tasks[1].status == Task.Status.SCHEDULED + tasks[1].status == Task.Status.IN_PROGRESS } when: "Polled for and executed subworkflow task" @@ -351,7 +349,7 @@ class SubWorkflowSpec extends AbstractSpecification { tasks[0].taskType == 'integration_task_1' tasks[0].status == Task.Status.COMPLETED tasks[1].taskType == 'SUB_WORKFLOW' - tasks[1].status == Task.Status.SCHEDULED + tasks[1].status == Task.Status.IN_PROGRESS } when: "the subworkflow is started by issuing a system task call"