tests: improve pulse integration tests (bug 2024547)#86
Open
Conversation
Add tests to exercise routing_key mismatches, and fix tests for successful delivery that were passing by luck. One key learning here is that each binding needs to be attached to a separate queue, otherwise any worker listening to a given queue may receive all messages matching the bindings.
shtrom
commented
Mar 27, 2026
f95c481 to
8831746
Compare
8831746 to
09a81f9
Compare
cgsheeh
approved these changes
Apr 2, 2026
|
|
||
| with ( | ||
| connection.Consumer(queue, auto_declare=False, callbacks=[callback]), | ||
| pytest.raises(TimeoutError), |
Member
There was a problem hiding this comment.
Can we check the TimeoutError for a specific message?
Member
Author
There was a problem hiding this comment.
Do you mean when a specific message is expected?
I don't think so, except for the structure of the test: here we send a single message with a non-default routing key, and listen on the default queue, to make sure that message doesn't show up there. So our expectations are never to get into the callback for the consumer, and a Timeout when it gives up waiting.
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.
docker: use container naming consistent across projects
tests: improve pulse integration tests
Add tests to exercise routing_key mismatches, and fix tests for
successful delivery that were passing by luck.
One key learning here is that each binding needs to be attached to a
separate queue, otherwise any worker listening to a given queue may
receive all messages matching any of the bindings.
lint: format test_config_files with ruff
tests: skip suite configuration placeholder
build: add rudimentary Makefile