Skip to content

[Feat/tests] Added Unit & Integration Tests - #5

Merged
Wern-rm merged 11 commits into
mainfrom
feat/tests
Jun 24, 2026
Merged

[Feat/tests] Added Unit & Integration Tests#5
Wern-rm merged 11 commits into
mainfrom
feat/tests

Conversation

@RedExtreme12

Copy link
Copy Markdown
Member

Added Unit & Integration Tests, changed CI/Release workflows with tests running.

  • Added Unit Tests to 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.
    • commandssetup_rabbitmq_topology and start_consumers wire up the right calls.
    • apps / utils — app config bootstraps managers & registries; helpers behave as expected.
  • Added Integration Tests to 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 raises UnroutableError; passive declare of a missing queue raises ChannelClosedByBroker.
    • 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 & tooling
    • github/workflows/ci.yml — unit tests across Python 3.10–3.14 + integration job against a rabbitmq:4.3.1-management service container.
  • publish.yml reuses the CI test jobs before release.
  • docker-compose.yml — local RabbitMQ (with management plugin) for running integration tests.
  • pytest/integration marker config and dev deps in pyproject.toml;

@Wern-rm Wern-rm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs to be finalized

Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/docker-compose.yml
@Wern-rm Wern-rm added the enhancement New feature or request label Jun 21, 2026
@Wern-rm Wern-rm assigned Wern-rm and RedExtreme12 and unassigned Wern-rm Jun 21, 2026
Comment thread README.md Outdated
@Wern-rm
Wern-rm merged commit 2e4ac09 into main Jun 24, 2026
31 checks passed
@Wern-rm
Wern-rm deleted the feat/tests branch June 24, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants