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

yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.1 by this push:
     new 635263a0b80 branch-4.1: [fix](test) Stabilize 
test_sql_block_rule_status BLOCKS assertion (#65075)
635263a0b80 is described below

commit 635263a0b80a875c1b3163fb25e4e888069e7fb0
Author: Calvin Kirs <[email protected]>
AuthorDate: Thu Jul 2 08:19:27 2026 +0800

    branch-4.1: [fix](test) Stabilize test_sql_block_rule_status BLOCKS 
assertion (#65075)
    
    cherry-pick apache/doris#64668
---
 .../schema_table/test_sql_block_rule_status.groovy         | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git 
a/regression-test/suites/query_p0/schema_table/test_sql_block_rule_status.groovy
 
b/regression-test/suites/query_p0/schema_table/test_sql_block_rule_status.groovy
index a41c7f17d10..3a66b01f27d 100644
--- 
a/regression-test/suites/query_p0/schema_table/test_sql_block_rule_status.groovy
+++ 
b/regression-test/suites/query_p0/schema_table/test_sql_block_rule_status.groovy
@@ -60,7 +60,19 @@ suite("test_sql_block_rule_status") {
     // a stray non-zero counter on another FE makes the cross-FE SUM exceed 1 
and flakes this test.
     sql "set fetch_all_fe_for_system_table=false"
     order_qt_count "SELECT count(*) FROM 
information_schema.sql_block_rule_status where name ='${blockRuleName}'"
-    order_qt_select "SELECT 
NAME,PATTERN,SQL_HASH,PARTITION_NUM,TABLET_NUM,CARDINALITY,GLOBAL,ENABLE,BLOCKS 
FROM information_schema.sql_block_rule_status where name ='${blockRuleName}'"
+    def statusRows = sql """
+        SELECT NAME, PATTERN, SQL_HASH, PARTITION_NUM, TABLET_NUM, 
CARDINALITY, GLOBAL, ENABLE, BLOCKS
+        FROM information_schema.sql_block_rule_status
+        WHERE name ='${blockRuleName}'
+    """
+    assertEquals(1, statusRows.size())
+    assertEquals(blockRuleName, statusRows[0][0].toString())
+    // BLOCKS is a process-wide, monotonically increasing hit counter on a 
global block rule.
+    // It is not isolated to this test's single query, so any extra matching 
evaluation under
+    // concurrent CI load (e.g. a transient statement re-delivery) can bump it 
past 1. Assert the
+    // meaningful invariant "the rule fired at least once" instead of an 
exact, racy count.
+    assertTrue(Integer.parseInt(statusRows[0][8].toString()) >= 1,
+            "BLOCKS should be >= 1 but was ${statusRows[0][8]}")
      sql """
         drop SQL_BLOCK_RULE if exists ${blockRuleName};
     """


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

Reply via email to