Fix flaky migration integration tests#696
Merged
Merged
Conversation
Replace the one-shot manual CRC32 checksum comparison with assert.Eventually and CHECKSUM TABLE. This handles the case where residual replication events haven't fully settled by the time the test compares tables, which was causing intermittent failures in CI due to variable Docker container I/O latency. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Armand Parajon <armand@squareup.com>
968964c to
aabab82
Compare
Wrap the checksum comparison in assert.Eventually (5s timeout, 250ms poll) to tolerate brief replication lag after the partial cutover. The original single-shot comparison could catch a transient mismatch when residual replication events hadn't fully settled in CI Docker containers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Armand Parajon <armand@squareup.com>
aabab82 to
9ab22fe
Compare
morgo
approved these changes
Apr 22, 2026
Collaborator
morgo
left a comment
There was a problem hiding this comment.
Let's try it. Always hard to know with flaky tests.
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.
What's this?
Fixes two intermittently failing integration tests in
pkg/migrationthat have been blocking CI on unrelated PRs.Changes
TestCutoverAtomicityWithConcurrentWritesassert.Eventually(5s timeout, 250ms poll) to tolerate brief replication lag after the partial cutoverTestResumeFromCheckpointE2EWithManualSentinelVerification
Both tests pass 5/5 locally against Docker MySQL with replication.
Most of this was written by Claude Code — I just provided direction.