Add xfail test for default queue/exchange fallback ignoring task_default_* settings#9765
Merged
auvipy merged 13 commits intoJun 25, 2025
Merged
Conversation
…o routing is used This test verifies that Celery currently ignores task_default_exchange_type and task_default_queue_type for the default 'celery' queue/exchange, falling back to 'direct' and 'classic' respectively. Marked as xfail with strict=True to track future fix.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9765 +/- ##
==========================================
- Coverage 78.52% 78.47% -0.05%
==========================================
Files 153 153
Lines 19130 19130
Branches 2533 2533
==========================================
- Hits 15021 15012 -9
- Misses 3821 3826 +5
- Partials 288 292 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: Copilot <[email protected]>
Waits for both rabbit and redis ports Co-authored-by: Copilot <[email protected]>
auvipy
approved these changes
Jun 23, 2025
Member
|
We need to figure out to fix this intermittent issue later.... raise TimeoutError(f"Timeout of {timeout}s exceeded") .tox/3.9-smoke/lib/python3.9/site-packages/pytest_docker_tools/utils.py:37: TimeoutError |
auvipy
requested changes
Jun 25, 2025
Member
auvipy
left a comment
There was a problem hiding this comment.
how about increasing the timeout?
auvipy
approved these changes
Jun 25, 2025
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.
Description
This PR adds a regression-style test to demonstrate that Celery falls back to creating a celery queue of type classic and an exchange of type direct, even when task_default_queue_type and task_default_exchange_type are explicitly set.
The test is marked with @pytest.mark.xfail(strict=True) to:
Related Discussion
This issue was raised in the Celery GitHub discussion: #9742
Why it matters
When using quorum queues or non-direct exchanges (e.g. topic), users expect Celery to respect the configured defaults. This test makes the fallback behavior visible and prevents silent reintroduction if fixed upstream.
Fixing this likely involves changes in Kombu’s handling of default queue declarations when tasks are published without explicit routing.