Save some time on some tests using synctest#19112
Merged
mhamza15 merged 1 commit intovitessio:mainfrom Jan 9, 2026
Merged
Conversation
Saving some time on some slow tests using [synctest](https://pkg.go.dev/testing/synctest). Slow tests pulled from changes in vitessio#19076. Before: ``` Signed-off-by: Mohamed Hamza <mhamza@fastmail.com> --- PASS: TestSleepTablet (15.01s) --- PASS: TestSleepTablet/default_sleep_duration (15.00s) --- PASS: TestEmergencyReparentShardSlow (0.00s) --- PASS: TestEmergencyReparentShardSlow/nil_WaitReplicasTimeout_and_request_takes_29_seconds_is_ok (29.00s) --- PASS: TestEmergencyReparentShardSlow/nil_WaitReplicasTimeout_and_request_takes_31_seconds_is_error (30.00s) --- PASS: TestPlannedReparentShardSlow (0.00s) --- PASS: TestPlannedReparentShardSlow/nil_WaitReplicasTimeout_and_request_takes_29_seconds_is_ok (28.01s) --- PASS: TestPlannedReparentShardSlow/nil_WaitReplicasTimeout_and_request_takes_31_seconds_is_error (30.00s) ok vitess.io/vitess/go/vt/vtctl/grpcvtctldserver 30.854s ``` After: ``` --- PASS: TestSleepTablet (0.00s) --- PASS: TestSleepTablet/default_sleep_duration (0.00s) --- PASS: TestEmergencyReparentShardSlow (0.00s) --- PASS: TestEmergencyReparentShardSlow/nil_WaitReplicasTimeout_and_request_takes_29_seconds_is_ok (0.01s) --- PASS: TestEmergencyReparentShardSlow/nil_WaitReplicasTimeout_and_request_takes_31_seconds_is_error (0.00s) --- PASS: TestPlannedReparentShardSlow (0.00s) --- PASS: TestPlannedReparentShardSlow/nil_WaitReplicasTimeout_and_request_takes_29_seconds_is_ok (0.01s) --- PASS: TestPlannedReparentShardSlow/nil_WaitReplicasTimeout_and_request_takes_31_seconds_is_error (0.01s) ok vitess.io/vitess/go/vt/vtctl/grpcvtctldserver 0.880s ``` Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
Contributor
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
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19112 +/- ##
=======================================
Coverage 69.89% 69.90%
=======================================
Files 1612 1612
Lines 215826 215826
=======================================
+ Hits 150857 150863 +6
+ Misses 64969 64963 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
Nice! I made a similar attempt to speed up other test cases here: #18701 My main concern is around back ports. Synctest was added in go 1.25, but on v22 we are still using go 1.24 so adding this in too many places will potentially make back ports a bit more complicated. But I think there's going to be a lot of test cases where the improvement is so significant that we can still make this trade off. 👍 |
arthurschreiber
approved these changes
Jan 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Saving some time on some slow tests using synctest. Slow tests pulled from changes in #19076.
Before:
After:
Related Issue(s)
Checklist
Deployment Notes
AI Disclosure