github-actions[bot] commented on code in PR #68150:
URL: https://github.com/apache/doris/pull/68150#discussion_r4043199159


##########
regression-test/suites/external_table_p0/iceberg/test_iceberg_deletion_vector.groovy:
##########
@@ -504,22 +506,34 @@ s3.path-style-access=true
             30
     )
     executeCommand("${dockerCommand} restart ${trinoContainerName}", true, 60)
-    String trinoRows = ""
-    for (int i = 0; i < 12; i++) {
-        Thread.sleep(5000)
-        trinoRows = normalizeExternalRows(executeCommand(
-                "${dockerCommand} exec ${trinoContainerName} trino 
--output-format TSV " +
-                        "--catalog iceberg --schema format_v3 --execute " +
-                        "\"SELECT id, batch, data " +
-                        "FROM dv_delete_matrix_equality_and_dv ORDER BY id\"",
-                false,
-                120
-        ))
-        if (!trinoRows.isEmpty()) {
+    String trinoCommand = "${dockerCommand} exec ${trinoContainerName} trino 
--output-format TSV " +
+            "--catalog iceberg --schema format_v3 --execute "
+    // A running container does not imply a ready coordinator. Retry startup 
separately so a
+    // failed data query cannot be mistaken for a successful query returning 
no rows.
+    long trinoReadyDeadline = System.nanoTime() + TimeUnit.SECONDS.toNanos(300)
+    def readiness = [exitCode: -1, stdout: "", stderr: "Readiness probe has 
not run"]
+    while (System.nanoTime() < trinoReadyDeadline) {
+        readiness = executeCommandWithStatus(trinoCommand + '"SELECT 1"', 10, 
false, false)
+        if (readiness.exitCode == 0 && readiness.stdout.trim() == "1") {
             break
-            }
+        }
+        Thread.sleep(1000)
     }
-    assertEquals(expectedRows, trinoRows)
+    assertTrue(readiness.exitCode == 0 && readiness.stdout.trim() == "1",
+            "Trino did not become ready within 300 seconds. Exit code: 
${readiness.exitCode}\n" +
+                    
"stdout:\n${readiness.stdout}\nstderr:\n${readiness.stderr}")
+
+    def trinoResult = executeCommandWithStatus(

Review Comment:
   **[P2] Wait for the output consumers before checking the Trino result**
   
   `executeCommandWithStatus` starts Groovy's asynchronous stdout/stderr 
consumers, waits only for the child process, and immediately snapshots the two 
`StringBuilder`s. In the pinned Groovy 4.0.19 implementation, 
`consumeProcessOutput` explicitly does not join those reader threads, so an 
exit-0 Trino query can reach this one-shot assertion with empty or partial TSV 
still in the pipe. The old loop retried an empty capture; this new single call 
makes that race a direct row mismatch. Please use a timeout-safe drain before 
constructing the returned strings—for example, retain the consumer threads, 
ensure timeout termination or stream closure releases the pipes, and wait for 
bounded or otherwise guaranteed consumer completion rather than doing a bare 
unbounded join.



##########
regression-test/suites/external_table_p0/tvf/test_s3_tvf_number_range.groovy:
##########
@@ -351,29 +353,25 @@ suite("test_s3_tvf_number_range", "p0,external") {
             
             // Helper closure to check load result
             def check_hdfs_load_result = {checklabel ->
-                def max_try_milli_secs = 10000
-                def success = false
-                while(max_try_milli_secs) {
-                    def result = sql """ SHOW LOAD WHERE LABEL = 
'${checklabel}' """
+                // Broker Load is asynchronous: cancellation or an unfinished 
job must fail here,

Review Comment:
   **[P2] Apply the fail-closed waiter to the S3 Broker Load too**
   
   This helper is declared inside the HDFS branch, so Test 11's parallel S3 
Broker Load above still only logs when the job is `CANCELLED` or when its 60 
polls expire, and then unconditionally runs `qt_test11_data`. Because that test 
truncates the table first, a cancelled or unfinished load is still reported as 
an empty-row mismatch (and a load that finishes between the timeout log and the 
query can even pass after the declared timeout). Please share this waiter with 
Test 11, or give its loop the same fail-on-cancel and fail-on-deadline behavior.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to