Repository navigation
test(query): seed both edge-yield fixtures from one timestamp - #323
Merged
Merged
Conversation
TestEdgeRollupYieldsToAQueuedPublisher seeded two databases, each taking its own time.Now().Truncate(time.Minute). When setup crossed a minute boundary the fixtures' earliest buckets differed by a minute, so the two passes' cursors differed by exactly 60 seconds and the comparison failed under the race detector on a loaded runner. Take the base time once per test, pass it to both fixtures, and assert the expected cursor exactly. Claude-Session: https://claude.ai/code/session_01XA52nWyQ3R5f5kK8kjpAQW
vishr
force-pushed
the
fix/edge-yield-flake
branch
from
October 16, 2026 19:52
5643656 to
f41baa9
Compare
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.
Summary
TestEdgeRollupYieldsToAQueuedPublisherfailed once in CI underjust test-race:Each fixture database took its own
time.Now().Truncate(time.Minute). If setup crossed a minute boundary, their earliest buckets differed by one minute. Each pass still committed one sub-window, but the cursors then differed by exactly 60 seconds.The fix takes the base time once per test, passes it to both fixtures, and asserts the expected cursor exactly. No product code changes.
Verification
-race -count=200on the test, with the defaultGOMAXPROCSand withGOMAXPROCS=2: 0 failures in both.go test -race ./internal/query/...: passed.just check(pre-push): passed.