-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix flaky test TestShardSync
#17095
Fix flaky test TestShardSync
#17095
Conversation
Signed-off-by: Manan Gupta <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
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.
Thanks, @GuptaManan100 ! ❤️
Signed-off-by: Manan Gupta <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #17095 +/- ##
========================================
Coverage 67.16% 67.16%
========================================
Files 1571 1571
Lines 252097 252249 +152
========================================
+ Hits 169318 169424 +106
- Misses 82779 82825 +46 ☔ View full report in Codecov by Sentry. |
Description
This PR fixes the flakiness in the test
TestShardSync
.It was noticed that the test was flaky. The problem was that when the tablet is promoted to a primary type, it starts shard sync, but it happens asynchronously. In the meantime we also update the shard record in the topo server. If the shard record is updated before the shard watch for the record has started, the tablet doesn't run a shard sync loop for 30 seconds, and that fails the test.
This PR fixes the test by adding an explicit wait for the shard watch to have started.
Related Issue(s)
Checklist
Deployment Notes