Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/region_syncer: make TestPrepareCheckerWithTransferLeader more stable #8357

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

HuSharp
Copy link
Member

@HuSharp HuSharp commented Jul 3, 2024

What problem does this PR solve?

waiting for leader change and avoid specific pd-name
test 90 times without error HuSharp#9

Issue Number: Close #8351

What is changed and how does it work?

Check List

Tests

  • Integration test
  • Manual test (add detailed scripts or steps below)

Release note

None.

Signed-off-by: husharp <[email protected]>
@HuSharp HuSharp requested review from lhy1024 and rleungx July 3, 2024 05:25
@ti-chi-bot ti-chi-bot bot added 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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 3, 2024
Copy link

codecov bot commented Jul 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.20%. Comparing base (a7f2632) to head (db60750).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8357      +/-   ##
==========================================
+ Coverage   77.16%   77.20%   +0.03%     
==========================================
  Files         470      470              
  Lines       61654    61652       -2     
==========================================
+ Hits        47578    47600      +22     
+ Misses      10490    10472      -18     
+ Partials     3586     3580       -6     
Flag Coverage Δ
unittests 77.20% <ø> (+0.03%) ⬆️

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

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jul 3, 2024
err = cluster.ResignLeader()
re.NoError(err)
re.Equal("pd1", cluster.WaitLeader())
re.NotEqual(leaderServer.GetLeader().GetName(), cluster.WaitLeader())
Copy link
Member

@rleungx rleungx Jul 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the WaitLeader still returns ""?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't get a reasonable leader, maybe we can assume the test has failed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous failure is caused by no leader and after this PR, will it still fail?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a detailed explanation in
#8351 (comment)

I think in this extreme situation, we can fail directly.

Copy link
Member Author

@HuSharp HuSharp Jul 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created an issue to focus on the Waitleader failure situation :) #8359

@HuSharp HuSharp requested a review from rleungx July 4, 2024 09:56
Copy link
Contributor

ti-chi-bot bot commented Jul 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lhy1024, rleungx

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

The pull request process is described here

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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 4, 2024
Copy link
Contributor

ti-chi-bot bot commented Jul 4, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-03 05:49:48.347066336 +0000 UTC m=+1389914.832555162: ☑️ agreed by lhy1024.
  • 2024-07-04 10:08:39.607452816 +0000 UTC m=+1491846.092941648: ☑️ agreed by rleungx.

Copy link
Contributor

ti-chi-bot bot commented Jul 4, 2024

@HuSharp: Your PR was out of date, I have automatically updated it for you.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot bot merged commit bc28a0f into tikv:master Jul 4, 2024
25 checks passed
@HuSharp HuSharp deleted the fix_prepare_checker_tesy branch July 4, 2024 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestPrepareCheckerWithTransferLeader is unstable
3 participants