-
Notifications
You must be signed in to change notification settings - Fork 726
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
Conversation
Signed-off-by: husharp <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. |
err = cluster.ResignLeader() | ||
re.NoError(err) | ||
re.Equal("pd1", cluster.WaitLeader()) | ||
re.NotEqual(leaderServer.GetLeader().GetName(), cluster.WaitLeader()) |
There was a problem hiding this comment.
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 ""
?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
[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 |
@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. |
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
Release note