Skip to content

test(rabbitmq): declare exchange and queue as durable - #1037

Closed
Tranquility2 wants to merge 1 commit into
mainfrom
fix/rabbitmq-durable-queue
Closed

test(rabbitmq): declare exchange and queue as durable#1037
Tranquility2 wants to merge 1 commit into
mainfrom
fix/rabbitmq-durable-queue

Conversation

@Tranquility2

Copy link
Copy Markdown
Contributor

Problem

test_docker_run_rabbitmq fails on all 4 parametrized cases against rabbitmq:latest (currently 4.x):

pika.exceptions.ConnectionClosedByBroker: (541, 'INTERNAL_ERROR -
Feature `transient_nonexcl_queues` is deprecated.
By default, this feature is not permitted anymore.')

The earlier IncompatibleProtocolError / StreamLostError lines in CI logs were a downstream symptom of the broker dropping the connection after the rejected queue declaration.

Fix

Declare both the exchange and the queue as durable=True. RabbitMQ 4.x disallows transient non-exclusive queues by default; durable is the supported replacement and is appropriate for an integration test that publishes/consumes a single message.

Verification

uv run pytest -q modules/rabbitmq/tests/test_rabbitmq.py — 4 passed locally against rabbitmq:latest.

@codecov

codecovBot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.29%. Comparing base (be4c857) to head (15cf24b).

Additional details and impacted files
@@ Coverage Diff @@## main #1037 +/- ##
=======================================
Coverage 83.29% 83.29% =======================================
Files 16 16 Lines 1754 1754 Branches 193 193 =======================================
Hits 1461 1461 Misses 236 236 Partials 57 57 

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexanderankin

Copy link
Copy Markdown
Member

can you guys coordinate? @CarliJoy? - I'm trying my best not to merge any PRs until after the src layout migration which i greenlit because the only other long standing PR which is strongly desired is the reusable containers one.

@Tranquility2

Copy link
Copy Markdown
ContributorAuthor

Superseded by 2622736 on main (fix(rabbitmq): declare queue as durable).
tests/community/rabbitmq/test_rabbitmq.py now uses channel.queue_declare(QUEUE, durable=True, arguments={}), which addresses the same flaky-test issue.
Closing.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Tranquility2@alexanderankin