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

liaoxin 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 6382742ad70 [test](move-memtable) mitigate flaky injection test 
`skip_two_backends` (#47082)
6382742ad70 is described below

commit 6382742ad701152a616263a3ae9dd3a37e87622a
Author: Kaijie Chen <[email protected]>
AuthorDate: Thu Jan 16 21:47:36 2025 +0800

    [test](move-memtable) mitigate flaky injection test `skip_two_backends` 
(#47082)
    
    Mitigate flaky test `skip_two_backends` in
    test_multi_replica_fault_injection.
    
    This test assumes a 3 BE environment and injects failure to 2 of them.
    However, it is currently running in a 4 BE environment. Depending on the
    replica distribution, the results may vary.
    This PR addresses the issue by acknowledging an additional error
    message. However, certain tablet distributions could still cause the
    test to be flaky, particularly as the number of backends increases.
---
 .../fault_injection_p0/test_multi_replica_fault_injection.groovy   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/regression-test/suites/fault_injection_p0/test_multi_replica_fault_injection.groovy
 
b/regression-test/suites/fault_injection_p0/test_multi_replica_fault_injection.groovy
index d09983d52d0..4e235daf97c 100644
--- 
a/regression-test/suites/fault_injection_p0/test_multi_replica_fault_injection.groovy
+++ 
b/regression-test/suites/fault_injection_p0/test_multi_replica_fault_injection.groovy
@@ -75,7 +75,7 @@ suite("test_multi_replica_fault_injection", "nonConcurrent") {
             file "baseall.txt"
         }
 
-        def load_with_injection = { injection, error_msg, success=false->
+        def load_with_injection = { injection, error_msg, success=false, 
alt_error_msg=null->
             try {
                 sql "truncate table test"
                 GetDebugPoint().enableDebugPointForAllBEs(injection)
@@ -83,7 +83,8 @@ suite("test_multi_replica_fault_injection", "nonConcurrent") {
                 assertTrue(success, String.format("Expected Exception '%s', 
actual success", error_msg))
             } catch(Exception e) {
                 logger.info(e.getMessage())
-                assertTrue(e.getMessage().contains(error_msg), e.toString())
+                boolean e_contains_alt_error_msg = (alt_error_msg != null && 
e.getMessage().contains(alt_error_msg))
+                assertTrue(e.getMessage().contains(error_msg) || 
e_contains_alt_error_msg, e.toString())
             } finally {
                 GetDebugPoint().disableDebugPointForAllBEs(injection)
             }
@@ -101,7 +102,7 @@ suite("test_multi_replica_fault_injection", 
"nonConcurrent") {
         // test one backend open failure
         load_with_injection("VTabletWriterV2._open_streams.skip_one_backend", 
"success", true)
         // test two backend open failure
-        load_with_injection("VTabletWriterV2._open_streams.skip_two_backends", 
"not enough streams 1/3")
+        load_with_injection("VTabletWriterV2._open_streams.skip_two_backends", 
"not enough streams 1/3", false, "succ replica num 1 < load required replica 
num 2")
         sql """ set enable_memtable_on_sink_node=false """
     }
 }


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

Reply via email to