Repository navigation
[test] Stabilize cluster health test setup - #4734
Merged
Merged
Conversation
Wait for leader initialization of all tables created by the merge-engine test before teardown deletes the schemas needed by KV recovery. Retry the initial cluster health assertions against one response until the cluster is GREEN before stopping a tablet server. This allows prior table deletion and leader activation to settle without racing a second health query. Fixes apache#4722 Co-Authored-By: Codex <noreply@openai.com> AI-Model: gpt-6 AI-Contributed/Feature: 0/0 AI-Contributed/UT: 31/31
gyang94
force-pushed
the
codex/fix-cluster-health-4722
branch
from
October 20, 2026 06:29
9e4e5c0 to
b2c8d42
Compare
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.
Purpose
Fixes #4722.
Stabilize
FlussAdminITCase.testClusterHealthDuringRollingUpgradewhen the shared cluster is still processing asynchronous table creation/deletion and leader activation from test setup and the preceding test.Brief change log
testCreateTableWithAggregateEngineAndWalChangelog, wait for every bucket leader of the default table and the five successfully created tables before teardown. Becoming leader completes KV initialization, so teardown cannot delete schemas while those leaders are still using them for KV recovery.testClusterHealthDuringRollingUpgrade, retry the initial GREEN status and replica-count assertions against the same health response before stopping a tablet server. This allows previous table deletions and coordinator-side leader activation to settle.Tests
Run locally with Java 11:
Passed: all 47 tests in both Surefire executions of the verify lifecycle (94 test executions, no failures/errors/skips). The lifecycle also passed Checkstyle, Spotless and the license check.
Also ran the two affected tests together five consecutive times, each with a fresh test cluster:
All five runs passed (10 test executions). Confirmed that the table-creation test ran immediately before the cluster-health test, with no
SchemaNotExistExceptionduring the test methods. An external INFO-level Log4j configuration was used for log inspection.Additional log inspection found schema-recovery exceptions during
FlussClusterExtension.afterAll, after both test methods had completed successfully, when closing servers triggered further leader changes. These shutdown diagnostics are outside the initial-health assertion fixed here.API and Format
No changes. This PR only changes tests.
Documentation
No documentation changes needed.
Generative AI disclosure
AI-assisted implementation and local validation using OpenAI Codex (GPT-6).