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


##########
regression-test/suites/audit/test_audit_log_queue_time.groovy:
##########
@@ -110,11 +111,12 @@ suite("test_audit_log_queue_time", "nonConcurrent") {
         auditResult = sql "${query}"
     }
 
-    auditResult.each { row ->
-        assertTrue(row[1] >= sqlSleepTime * 1000)
+    log.info("audit queue time result for marker ${testMarker}: 
${auditResult}")

Review Comment:
   This still leaves the test dependent on thread scheduling. `queue_time_ms` 
is measured from the queued query's own `QueueToken` construction until it is 
admitted, not from when the first `sleep(5)` query starts. Since these two 
Groovy threads are just started in a loop, the second thread can reach 
`QueryQueue.getToken()` more than one second after the first query starts and 
still queue correctly; in that case the audit row would be below `5000 - 1000` 
ms even though the workload queue behaved correctly. Please synchronize the two 
workers before issuing the `select` (for example with a latch/barrier after 
`set workload_group`) or base the assertion on an observed start/admission 
interval instead of a fixed tolerance.



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