elsa-core/test/unit/Elsa.Workflows.Runtime.UnitTests
Sipke Schoorstra 68a5aa6bd7
fix(runtime): honor transactional outbox for in-workflow PublishEvent (#8177)
* fix(runtime): route PublishEvent through transactional workflow-dispatch outbox

In-workflow async PublishEvent and IEventPublisher now dispatch via
IWorkflowDispatcher so TransactionalWorkflowDispatcher applies when
UseTransactionalOutbox is enabled. Fixes #8150.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* test(runtime): fix PublishEvent outbox conformance tests

Register KeyValueFeature so the dispatch outbox store can persist
TriggerWorkflows items, and avoid expression-tree pattern matching in
the EventPublisher unit tests.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* test(runtime): assert PublishEvent outbox delivery creates consumer

ProcessAsync only queues the trigger; start the background command
processor and wait until ConsumeOrderShippedEventWorkflow is created.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-09-15 22:10:29 +02:00
..
Comparers Refactor: Overhauls workflow JSON type serialization (#7549) 2026-05-31 11:09:39 +02:00
Distributed [codex] Scope console logs to workflow instances (#7535) 2026-05-25 11:49:51 +02:00
Extensions [codex] Fix console log metadata and type resolution (#7542) 2026-05-30 22:52:01 +02:00
Features Refactor: Overhauls workflow JSON type serialization (#7549) 2026-05-31 11:09:39 +02:00
Handlers Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00
HealthChecks Address health check review feedback 2026-05-21 02:13:19 +02:00
LogPersistence fix(runtime): read InternalState from logPersistenceConfig (#8126) 2026-09-13 23:09:36 +02:00
Models Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00
Options Graceful shutdown for the workflow runtime (drain, pause, recover) (#7424) 2026-05-02 19:27:08 +02:00
Quiescence fix(runtime): close drain cancel-dispose race (#8123) 2026-09-13 21:28:33 +02:00
Recovery Graceful shutdown for the workflow runtime (drain, pause, recover) (#7424) 2026-05-02 19:27:08 +02:00
Services fix(runtime): honor transactional outbox for in-workflow PublishEvent (#8177) 2026-09-15 22:10:29 +02:00
Stores fix(persistence): honor tenant isolation in Memory workflow stores (#8100) 2026-09-13 02:56:01 -07:00
Elsa.Workflows.Runtime.UnitTests.csproj [codex] Validate distributed runtime lock provider (#7515) 2026-05-21 23:29:14 +02:00