test: the streams test finds a delivery by its payload, not its place in the list - #42
Merged
Merged
Conversation
3 of 4 tasks
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
The Streams conformance test assumed that two deliveries are listed in the order they were made.
JobListreturns jobs in ID order, and on Postgres 14 to 17 two IDs generated in the same millisecond sort randomly (hopper_uuidv7there is a millisecond timestamp plus random bits). When both pumps land in one millisecond the test looked at the wrong delivery and failed atstream.go:152(audit deliveries = [...]). No library code changes.The test now picks the delivery of the unkeyed event by its payload, as the earlier part of the same test already does.
This came out of a sweep for timing assumptions: the suite run in a CPU-limited container against a CPU-limited Postgres 17, then with network delay added to Postgres's replies.
Round 5's four failures are left alone.
TestConcurrentClientsFinalizeExactlyOnce,TestGlobalLimitHoldsAcrossClientsandTestUpgradeUnderTrafficran out of their 15-second budgets, andTestPeriodicJobsRunOnceAcrossLeaderssaw a leader change inside its 3.5-second window, which needs the leader to stall for its whole 2-second lease. None is a wrong result, and nothing on the CI runners has come close to that delay.Testing
go test -race -count=40 -run TestConformance/Streams ./driver/hopperpgx ./driver/hoppersqlpasses with the fix.golangci-lint: 0 issues.Only a test changed, so no
hopperbenchresults.Checklist
make checkpasses — lint and the changed test run locally; the full suite runs in CI hereGODEBUG=fips140=only)docs/PLAN.md— none