test: the dedup test holds the first delivery until the repeated publish - #40
Merged
Merged
Conversation
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
TestPublishDedupAndReplayfailed thecanaryCI run of #37 on Postgres 14 (repeated publish = &{... Duplicate:false}). It is a race in the test; no library code changes.The test publishes a message with a dedup key, publishes it again and expects the second to be a duplicate. A dedup key is free again once its delivery is finalized, and the subscription has one attempt that fails. On a slow runner the first delivery was claimed, failed and discarded before the second publish was made, so the second was a new delivery, as designed. The handler now holds the first delivery until the repeated publish has been made.
Testing
go test -race -count=30 -run TestPublishDedupAndReplay .passes against Postgres 17.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