Skip to content

tests/tso: stabilize TestLegacyTSOConsistencySuite startup path#10342

Closed
okJiang wants to merge 1 commit intotikv:masterfrom
okJiang:codex/flaky-10332-legacy-tso-consistency
Closed

tests/tso: stabilize TestLegacyTSOConsistencySuite startup path#10342
okJiang wants to merge 1 commit intotikv:masterfrom
okJiang:codex/flaky-10332-legacy-tso-consistency

Conversation

@okJiang
Copy link
Copy Markdown
Member

@okJiang okJiang commented Mar 12, 2026

What problem does this PR solve?

Issue Number: ref #10332

TestLegacyTSOConsistencySuite is flaky in CI due to timeout while setting up the suite.

Root-cause evidence chain:

What is changed and how does it work?

Historical analog:

  • test: fix flaky test TestForwardTestSuite in next-gen #10203 (test: fix flaky test TestForwardTestSuite in next-gen)
  • Relevance: both failures involve instability around RunInitialServers startup/retry path under CI contention; fix strategy is to avoid unnecessary entry into that path for test stabilization.

Fix strategy (minimal):

  • In TestFallbackTSOConsistency, remove in-test TearDownSuite() + SetupSuite() cluster restart.
  • Keep failpoint injection (fallBackSync, fallBackUpdate) on the already-initialized suite and always disable via defer.

Risk:

  • Low. The test still exercises fallback behavior and monotonicity checks, but avoids redundant cluster lifecycle churn.

Check List

Tests

  • Integration test

Verification commands + results

  • make gotest GOTEST_ARGS='-tags without_dashboard ./tso -run TestLegacyTSOConsistencySuite -count=1 -v' (in tests/integrations): PASS
    • TestLegacyTSOConsistencySuite/TestFallbackTSOConsistency: PASS
    • total: ok github.com/tikv/pd/tests/integrations/tso
  • make gotest GOTEST_ARGS='-tags without_dashboard ./tso -run TestMicroserviceTSOConsistencySuite/TestFallbackTSOConsistency -count=1 -v' (in tests/integrations): PASS
    • TestMicroserviceTSOConsistencySuite/TestFallbackTSOConsistency: PASS
    • total: ok github.com/tikv/pd/tests/integrations/tso

Release note

None.

Signed-off-by: okjiang <819421878@qq.com>
@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot bot commented Mar 12, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. labels Mar 12, 2026
@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot bot commented Mar 12, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign overvenus for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 12, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 12, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 983b5e2e-a7bc-4390-89e4-49845986cbbc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can enable review details to help with troubleshooting, context usage and more.

Enable the reviews.review_details setting to include review details such as the model used, the time taken for each step and more in the review comments.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.89%. Comparing base (0059e6f) to head (de3743e).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10342   +/-   ##
=======================================
  Coverage   78.88%   78.89%           
=======================================
  Files         527      527           
  Lines       70920    70920           
=======================================
+ Hits        55944    55950    +6     
+ Misses      10978    10960   -18     
- Partials     3998     4010   +12     
Flag Coverage Δ
unittests 78.89% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rleungx
Copy link
Copy Markdown
Member

rleungx commented Mar 13, 2026

Is it ready for review?

@okJiang
Copy link
Copy Markdown
Member Author

okJiang commented Mar 17, 2026

Is it ready for review?

This PR does not address the root cause. I will close it.

This PR does not use the most powerful model (it was modified after being updated), I will run it again using the most powerful model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the dco. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants