This is an automated email from the ASF dual-hosted git repository.

hellostephen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 3d2833acfaf [test](auth)Refactor Stream Load auth case to include 
retry logic (#60243)
3d2833acfaf is described below

commit 3d2833acfaf03421e16ba7166d944415b545ae3c
Author: zfr95 <[email protected]>
AuthorDate: Tue Jan 27 16:55:12 2026 +0800

    [test](auth)Refactor Stream Load auth case to include retry logic (#60243)
---
 .../auth_call/test_dml_stream_load_auth.groovy     | 69 +++++++++++++++++-----
 1 file changed, 53 insertions(+), 16 deletions(-)

diff --git a/regression-test/suites/auth_call/test_dml_stream_load_auth.groovy 
b/regression-test/suites/auth_call/test_dml_stream_load_auth.groovy
index 6c8eb9f57bb..449bec50347 100644
--- a/regression-test/suites/auth_call/test_dml_stream_load_auth.groovy
+++ b/regression-test/suites/auth_call/test_dml_stream_load_auth.groovy
@@ -70,27 +70,64 @@ suite("test_dml_stream_load_auth","p0,auth_call") {
     cm = "bash " + load_path
     logger.info("cm:" + cm)
 
+    // Added a retry mechanism as the service instability may cause 
intermittent failures
+    def maxRetries = 3
+    def retryCount = 0
+    def success = false
+    def sout = ""
+    def serr = ""
 
-    def proc = cm.execute()
-    proc.waitForOrKill(7200000)
-    def sout = proc.inputStream.text.trim()
-    def serr = proc.errorStream.text.trim()
-    logger.info("std out: " + sout)
-    logger.info("std err: " + serr)
-    assertTrue(sout.indexOf("denied") != -1,
-               "Expected 'denied' message not found in response: '${sout}'")
+    while (retryCount < maxRetries && !success) {
+        retryCount++
+        def proc = cm.execute()
+        proc.waitForOrKill(7200000)
+        sout = proc.inputStream.text.trim()
+        serr = proc.errorStream.text.trim()
+        logger.info("std out: " + sout)
+        logger.info("std err: " + serr)
 
+        if (sout.contains("denied")) {
+            success = true
+            logger.info("Success: 'denied' message received.")
+        } else {
+            if (retryCount < maxRetries) {
+                logger.warn("Attempt ${retryCount} failed. Retrying in 2 
seconds...")
+                sleep(2000)
+            }
+        }
+    }
+
+    // Final assertion: If all three retries fail, throw an error.
+    assertTrue(success, "After ${maxRetries} attempts, expected 'denied' 
message not found. \nFinal StdOut: ${sout} \nFinal StdErr: ${serr}")
 
     sql """grant load_priv on ${dbName}.${tableName} to ${user}"""
 
-    proc = cm.execute()
-    proc.waitForOrKill(7200000)
-    def sout2 = proc.inputStream.text.trim()
-    def serr2 = proc.errorStream.text.trim()
-    logger.info("std out: " + sout2)
-    logger.info("std err: " + serr2)
-    assertTrue(sout2.indexOf("denied") == -1,
-               "Unexpected 'denied' message in response after granting 
load_priv: '${sout2}'")
+    maxRetries = 3
+    retryCount = 0
+    success = false
+    def sout2 = ""
+    def serr2 = ""
+
+    while (retryCount < maxRetries && !success) {
+        retryCount++
+        def proc = cm.execute()
+        proc.waitForOrKill(7200000)
+        sout2 = proc.inputStream.text.trim()
+        serr2 = proc.errorStream.text.trim()
+        logger.info("std out: " + sout2)
+        logger.info("std err: " + serr2)
+
+        if (sout2.indexOf("denied") == -1) {
+            success = true
+        } else {
+            if (retryCount < maxRetries) {
+                logger.warn("Attempt ${retryCount} still showing 'denied'. 
Retrying after 2s...")
+                sleep(2000)
+            }
+        }
+    }
+
+    assertTrue(success, "Unexpected 'denied' message in response after 
${maxRetries} attempts: '${sout2}'")
 
     connect(user, "${pwd}", context.config.jdbcUrl) {
         test {


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

Reply via email to