shrihari7396 commented on code in PR #18001:
URL: 
https://github.com/apache/dolphinscheduler/pull/18001#discussion_r2889822396


##########
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartTestCase.java:
##########
@@ -1770,4 +1770,88 @@ public void 
testTaskRemainsSubmittedSuccess_with_noAvailableWorkerAndTimeoutDisa
         // masterContainer.assertAllResourceReleased();
     }
 
+    @Test
+    @DisplayName("Test start a workflow which contains a dep task with timeout 
warn strategy")
+    public void testStartWorkflow_withTimeoutWarnTask() {
+        final String yaml = "/it/start/workflow_with_timeout_warn_task.yaml";
+        final WorkflowTestCaseContext context = 
workflowTestCaseContextFactory.initializeContextFromYaml(yaml);
+        final WorkflowDefinition workflow = 
context.getWorkflow("workflow_with_timeout_warn_task");
+
+        final WorkflowOperator.WorkflowTriggerDTO workflowTriggerDTO = 
WorkflowOperator.WorkflowTriggerDTO
+                .builder()
+                .workflowDefinition(workflow)
+                .runWorkflowCommandParam(new RunWorkflowCommandParam())
+                .build();
+        workflowOperator.manualTriggerWorkflow(workflowTriggerDTO);
+
+        await()
+                .atMost(Duration.ofSeconds(90))
+                .untilAsserted(() -> {
+                    Assertions
+                            
.assertThat(repository.queryWorkflowInstance(workflow))
+                            .satisfiesExactly(workflowInstance -> assertThat(
+                                    workflowInstance.getState())
+                                            
.isEqualTo(WorkflowExecutionStatus.RUNNING_EXECUTION));
+                    Assertions
+                            .assertThat(repository.queryTaskInstance(workflow))
+                            .hasSize(1)
+                            .satisfiesExactly(taskInstance -> {
+                                assertThat(taskInstance.getName()).isEqualTo(
+                                        "dep_task_with_timeout_warn");
+                                assertThat(taskInstance.getState())
+                                        
.isEqualTo(TaskExecutionStatus.RUNNING_EXECUTION);
+                            });
+
+                    Assertions
+                            
.assertThat(repository.queryWorkflowInstance(workflow))
+                            .satisfiesExactly(workflowInstance -> 
assertThat(workflowInstance.getState())
+                                    
.isEqualTo(WorkflowExecutionStatus.RUNNING_EXECUTION));
+                });
+        // This test intentionally leaves the workflow running, so we skip the 
resource
+        // cleanup check.
+        // masterContainer.assertAllResourceReleased();

Review Comment:
   Got it, thanks for the suggestion. I'll update the test to kill the workflow 
and remove the commented code.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to