-
Notifications
You must be signed in to change notification settings - Fork 725
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
tests/api: refine TestPreparingProgress to make test stable #8014
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #8014 +/- ##
==========================================
- Coverage 77.27% 77.23% -0.05%
==========================================
Files 468 468
Lines 60890 60869 -21
==========================================
- Hits 47055 47012 -43
- Misses 10291 10307 +16
- Partials 3544 3550 +6
Flags with carried forward coverage won't be shown. Click here to find out more. |
1671e73
to
ce51e6b
Compare
ce51e6b
to
a8b2574
Compare
/hold |
…ine_progress_test
73522cf
to
f6616a3
Compare
/unhold |
if !leader.GetRaftCluster().IsPrepared() { | ||
leader.GetRaftCluster().SetPrepared() | ||
return false |
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.
Do we need them since line 782 is return true?
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 enter the if judgment at line 782, then return at line 792. Then there's still a chance that we didn't prepare, so we need to wait for prepare to finish.
- The previous Eventually(line 782-798) is actually a judgment for not preparing.
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.
got
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 rest LGTM
Signed-off-by: husharp <jinhao.hu@pingcap.com>
/merge |
@HuSharp: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger
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. |
This pull request has been accepted and is ready to merge. Commit hash: 7b3e56c
|
What problem does this PR solve?
Issue Number: Ref #7969
What is changed and how does it work?
Because
TestPreparingProgress
mixescluster prepare
(3s per tick) andcheckStores
scheduler prepare (3s per tick)
pd/pkg/schedule/coordinator.go
Lines 402 to 419 in 945e29c
checkStores(2s per tick)
pd/server/cluster/cluster.go
Lines 676 to 696 in 945e29c
If sleep 2s directly(which wants to wait for
checkStores tick
maybe mixedcluster prepare
&checkStores
, which will make test unstable.pd/tests/server/api/api_test.go
Lines 936 to 945 in cd0ffba
So I have changed to eventually.
Check List
Tests
Release note