branch-4.1: [fix](test) Stabilize test_sql_block_rule_status BLOCKS assertion#65075
Open
CalvinKirs wants to merge 1 commit into
Open
branch-4.1: [fix](test) Stabilize test_sql_block_rule_status BLOCKS assertion#65075CalvinKirs wants to merge 1 commit into
CalvinKirs wants to merge 1 commit into
Conversation
…4668) `test_sql_block_rule_status` fails intermittently on the community P0 pipeline (observed ~2/8 builds, clustered under high CI load across several unrelated PRs). The failure is the exact-value assertion on the `BLOCKS` column: ``` assertEquals("1", statusRows[0][9].toString()) // expected 1, actual 2 ``` `BLOCKS` is read from `SqlBlockRule.getBlockCount()`, a **process-wide, monotonically increasing** `LongCounterMetric`. The rule under test is created with `global=true`, so its counter is shared cluster-wide and is **not isolated** to this test's single matching query. On a quiet FE a single matching query deterministically yields `BLOCKS == 1`, but any additional matching evaluation of the same statement under concurrent CI load (e.g. a transient JDBC/network statement re-delivery) bumps the shared counter past 1. The defect is the test asserting an exact value on a shared monotonic counter — not the counting logic itself. This is a pre-existing flake, not introduced by any specific PR. Assert the meaningful invariant — *the rule fired at least once* — instead of an exact, racy count: ```groovy assertTrue(Integer.parseInt(statusRows[0][9].toString()) >= 1, "BLOCKS should be >= 1 but was ${statusRows[0][9]}") ```
Member
Author
|
run buildall |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cherry-pick #64668