KwongHing commented on code in PR #17614:
URL: 
https://github.com/apache/dolphinscheduler/pull/17614#discussion_r2489023946


##########
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartTestCase.java:
##########
@@ -141,15 +145,32 @@ public void 
testStartWorkflow_with_oneSuccessTaskUsingTaskGroup() {
         workflowOperator.manualTriggerWorkflow(workflowTriggerDTO);
         workflowOperator.manualTriggerWorkflow(workflowTriggerDTO);
 
+        final TaskDefinition taskDefinition = context.getTasks().get(0);
+        final Map<Integer, TaskGroupQueue> taskGroupQueueMap = new HashMap<>();
+
         await()
                 .atMost(Duration.ofMinutes(2))
                 .atLeast(Duration.ofSeconds(20))
                 .untilAsserted(() -> {
+
+                    // Capture TaskGroupQueue records during execution since 
they are deleted after task completion.
+                    
repository.queryTaskGroupQueue(workflow).forEach(taskGroupQueue -> {
+                        taskGroupQueueMap.put(taskGroupQueue.getId(), 
taskGroupQueue);
+                    });
+
                     Assertions
                             .assertThat(repository.queryTaskInstance(workflow))
                             .hasSize(4)
                             .allMatch(taskInstance -> 
TaskExecutionStatus.SUCCESS.equals(taskInstance.getState())
                                     && taskInstance.getTaskGroupId() == 
context.getTaskGroups().get(0).getId());
+
+                    Assertions
+                            .assertThat(taskGroupQueueMap)
+                            .hasSize(4)
+                            .allSatisfy((id, taskGroupQueue) -> {
+                                
assertThat(taskGroupQueue.getGroupId()).isEqualTo(taskDefinition.getTaskGroupId());
+                                
assertThat(taskGroupQueue.getPriority()).isEqualTo(1);

Review Comment:
   I’ve checked the code. The `t_ds_task_instance` table doesn’t contain the 
`task_group_priority` field.
   It only exists in the `t_ds_task_definition` and `t_ds_task_group_queue` 
tables,
   so I believe the priority number can only be verified from 
`t_ds_task_group_queue` after the workflow starts.



-- 
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