Skip to content

test: validate broker adapters against Docker services - #15

Merged
CoreyLeath-code merged 16 commits into
mainfrom
test/broker-adapter-integration
Aug 6, 2026
Merged

test: validate broker adapters against Docker services#15
CoreyLeath-code merged 16 commits into
mainfrom
test/broker-adapter-integration

Conversation

@CoreyLeath-code

@CoreyLeath-code CoreyLeath-code commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

Adds Docker-backed, real-broker round-trip tests for the existing Kafka, Redis Streams, and RabbitMQ adapter modules, and fixes the two Redis production defects exposed by that validation: an obsolete client import and the stream-blocking argument.

Files changed

  • redis_bus.py — replaces incompatible aioredis use with the already-declared redis.asyncio client, creates the client synchronously, uses the supported block argument for xread, and closes it with aclose().
  • tests/integration/docker-compose.yml — isolated Kafka, Redis, and RabbitMQ services used only by integration tests; Kafka is configured for one-node consumer-group startup.
  • tests/integration/test_broker_adapters.py — one @pytest.mark.integration round trip per existing adapter.
  • requirements-dev.txt — retains test-only Kafka/RabbitMQ clients and removes the incompatible legacy aioredis package.
  • pyproject.toml — registers the integration marker and makes the default suite exclude it, preserving a Docker-free unit path.
  • .github/workflows/ci.yml — adds a dedicated pytest -m integration job with Docker startup and always-on teardown.
  • README.md — records the verified adapter-validation status.

Brokers and verified test result

Broker Adapter Result
Kafka kafka_bus.py Passed real publish/consume round trip
Redis redis_bus.py Passed real publish/consume round trip after the production API fix
RabbitMQ rabbitmq_bus.py Passed real publish/consume round trip

Validation performed

  • CI run 144: fast formatting, lint, type, Docker Compose validation, unit test, benchmark, and JSON-validation checks all passed.
  • Dedicated broker job: pytest -m integration selected all three adapter tests and passed: 3 passed, 16 deselected in 3.56s.
  • The deselected tests are the normal Docker-free unit suite; no integration check was skipped.

Risks

  • Broker containers add duration to the dedicated integration job only.
  • The test environment uses versioned container tags; adopting digest pinning would further improve supply-chain repeatability.

Follow-up recommendations

  • Make the dedicated broker job a required merge check once the branch-protection policy is updated.
  • Add explicit reconnection and broker-unavailability behavior tests as a separate resilience-focused change.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@CoreyLeath-code, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 94e9643f-ddb1-49b2-a3cd-0f5344b0851e

📥 Commits

Reviewing files that changed from the base of the PR and between f122f4f and b8ba1ee.

📒 Files selected for processing (7)
  • .github/workflows/ci.yml
  • README.md
  • pyproject.toml
  • redis_bus.py
  • requirements-dev.txt
  • tests/integration/docker-compose.yml
  • tests/integration/test_broker_adapters.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@CoreyLeath-code
CoreyLeath-code marked this pull request as ready for review August 6, 2026 03:31
@CoreyLeath-code
CoreyLeath-code merged commit f212a08 into main Aug 6, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant