[Feat/tests] Added Unit & Integration Tests - #5
Merged
Merged
Conversation
# Conflicts: # README.md
Wern-rm
reviewed
Jun 21, 2026
Wern-rm
reviewed
Jun 21, 2026
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.
Added Unit & Integration Tests, changed CI/Release workflows with tests running.
Unit Teststo verify our code drives pika correctly, with the broker fully mocked (no live RabbitMQ needed):consumer— dispatches deliveries to the handler, refreshes DB connections, and on handler error nacks without requeue (requeue=False).producer— publishes with mandatory=True, and drops & rebuilds a dead channel to republish.connections— connection manager builds parameters, lazily opens, and resets channels.registries— consumer & setup registries register and resolve correctly per alias.commands—setup_rabbitmq_topologyandstart_consumerswire up the right calls.apps / utils— app config bootstraps managers & registries; helpers behave as expected.Integration Teststo prove broker-side consequences the mocked unit tests can't:roundtrip— real producer → real consumer via default & direct exchanges.dlx— handler exception actually dead-letters into the DLQ.reconnect— consumer & producer self-heal after a broker-side connection kill.mandatory— unroutable publish raisesUnroutableError; passive declare of a missing queue raisesChannelClosedByBroker.consumer_lifecycle— graceful stop, prefetch_count back-pressure, multi-alias vhost isolation.commands— setup_rabbitmq_topology (idempotent) and start_consumers (in a real subprocess).CI & toolinggithub/workflows/ci.yml— unit tests across Python 3.10–3.14 + integration job against a rabbitmq:4.3.1-management service container.publish.ymlreuses the CI test jobs before release.docker-compose.yml— local RabbitMQ (with management plugin) for running integration tests.pytest/integrationmarker config and dev deps in pyproject.toml;