Skip to content

test: cover EntityFrameworkOutboxStore parallel publishing throttle and per-message outcome recording#346

Merged
Vulthil merged 1 commit into
mainfrom
outbox-ef-parallel-publishing-tests
Jul 21, 2026
Merged

test: cover EntityFrameworkOutboxStore parallel publishing throttle and per-message outcome recording#346
Vulthil merged 1 commit into
mainfrom
outbox-ef-parallel-publishing-tests

Conversation

@Vulthil

@Vulthil Vulthil commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds direct coverage of the real EntityFrameworkOutboxStore parallel-publishing throttle (EnableParallelPublishing / MaxDegreeOfParallelism), which previously had no tests against the real store — the existing coverage only exercised fakes that mirrored the semaphore pattern.
  • ThrottlesParallelDispatchToTheConfiguredMaxDegreeOfParallelism: a gate-based ConcurrencyTrackingDispatcher parks dispatches until the cap is saturated, proving peak concurrent dispatches reach and never exceed the configured MaxDegreeOfParallelism — deterministically, with no timing sleeps.
  • RecordsEachMessageOutcomeIndividuallyWhenAParallelBatchHasAFailure: one failing dispatch in a parallel batch leaves the other rows' outcomes intact (ProcessedOnUtc set, RetryCount 0, no error) while the failing row records RetryCount 1 and its error without being dead-lettered.
  • Extends the NewStore helper with optional parallel-publishing parameters; test-only change, no src/ modifications.

Verification

  • Full solution build with 0 errors (warnings-as-errors on).
  • Built test executable run with --filter-class on the store test class for net9.0 and net10.0: 7/7 passed on both.
  • Full Vulthil.SharedKernel.Outbox.EntityFrameworkCore.Tests project: 12/12 on both TFMs, plus 3 repeat runs of the class to confirm the concurrency test is stable.

Backport to v1.0: no

@claude

claude Bot commented Jul 21, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@Vulthil
Vulthil merged commit f340a3b into main Jul 21, 2026
6 checks passed
@Vulthil
Vulthil deleted the outbox-ef-parallel-publishing-tests branch July 21, 2026 15:29
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