Skip to content

test: push Effect line coverage to 94.8% via DataContext logging + real-broker RabbitMQ tests#60

Merged
Theauxm merged 1 commit intomainfrom
test/data-logging-and-rabbitmq-coverage
May 5, 2026
Merged

test: push Effect line coverage to 94.8% via DataContext logging + real-broker RabbitMQ tests#60
Theauxm merged 1 commit intomainfrom
test/data-logging-and-rabbitmq-coverage

Conversation

@Theauxm
Copy link
Copy Markdown
Member

@Theauxm Theauxm commented May 5, 2026

Summary

Closes the two biggest remaining gaps that needed infrastructure:

  • DataContext logging (`DataContextLogger` + `DataContextLoggingProvider`) exercised end-to-end against InMemory. `DataContextLogger` covers level filter, EF.Database.Command short-circuit, exact + wildcard blacklist, IsEnabled, BeginScope. `DataContextLoggingProvider` covers blacklist regex construction, CreateLogger configuration, FlushLoopAsync batching against InMemory, and double-Dispose safety.
  • RabbitMQ broadcaster (`RabbitMqTrainEventBroadcaster` + `RabbitMqTrainEventReceiver`) against a real broker. Round-trip publish/receive, channel reuse on repeated publishes, handler-throws / Nack-and-keep-consuming, Stop/Dispose cleanup.

Infra

CI pull_request and nuget_release workflows now provision a `rabbitmq:3` service container alongside postgres. Local dev uses the docker-compose RabbitMQ on `amqp://guest:guest@localhost:5672/`.

Numbers

Local line coverage on Trax.Effect aggregate moves from 86.7% to 94.8%.

Test plan

  • All test projects pass locally
  • `dotnet csharpier check .` — clean

…Memory and RabbitMQ broadcaster against a real broker

Two new test files:
- DataContextLoggingProviderTests exercises every branch of
  DataContextLogger (level filter, EF.Database.Command short-circuit,
  exact + wildcard blacklist, IsEnabled, BeginScope) and the provider's
  blacklist construction, CreateLogger configuration, FlushLoopAsync
  batching against InMemory, and double-Dispose safety.
- RabbitMqBroadcasterIntegrationTests stands up
  RabbitMqTrainEventBroadcaster + RabbitMqTrainEventReceiver against a
  real broker, covering round-trip publish/receive, channel reuse on
  repeated publishes, handler-throws / Nack-and-keep-consuming, and
  Stop/Dispose cleanup paths.

CI pull_request and nuget_release workflows now provision a rabbitmq:3
service container alongside postgres so the broadcaster suite runs in
CI. Local development uses the docker-compose RabbitMQ on
amqp://guest:guest@localhost:5672/.

Local line coverage on Trax.Effect aggregate moves from 86.7% to 94.8%.
@Theauxm Theauxm merged commit 5a2f6a9 into main May 5, 2026
1 check passed
@Theauxm Theauxm deleted the test/data-logging-and-rabbitmq-coverage branch May 5, 2026 21:30
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@traxsharp
Copy link
Copy Markdown

traxsharp Bot commented May 8, 2026

This PR is included in version 1.34.0

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