test: remove fixed waits from trivial ERS e2e#97
Draft
cursor[bot] wants to merge 1 commit intomainfrom
Draft
Conversation
Signed-off-by: Cursor Agent <cursoragent@cursor.com>
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
This PR speeds up one of the slowest tests in the slowest meaningful
cluster_endtoendshard onmainby removing fixed sleeps fromgo/test/endtoend/reparent/emergencyreparent.TestTrivialERS.While reviewing the latest successful upstream CI runs with
gh --repo vitessio/vitess, the latest meaningfulcluster_endtoendsuccess was run23057103687, whereRun endtoend tests on Cluster (ers_prs_newfeatures_heavy)was the slowest job at about 24m17s. Within that shard,TestTrivialERSwas one of the biggest individual contributors at about 62.97s. The test was paying a fixed 40s tax from eight unconditionaltime.Sleep(5 * time.Second)calls after ERS operations.This change replaces those fixed waits with state-based validation that waits only until the cluster is actually healthy again:
That preserves the test's intent while avoiding hard-coded idle time.
Related Issue(s)
Checklist
Deployment Notes
No deployment changes.
Validation
Local targeted e2e validation:
Result after this change:
ok vitess.io/vitess/go/test/endtoend/reparent/emergencyreparent 30.230sFor comparison, the latest meaningful upstream CI log showed this test at about
62.97s, so the targeted runtime was cut roughly in half locally.AI Disclosure
This PR was authored by GPT-5 with local validation and CI log analysis.