elsa-core/test/integration
Rostislav Statko 54c8fda65f
fix(alterations): preserve tenant context for background alteration jobs (#7962)
* Fix tenant context propagation for alteration jobs

Capture the current tenant when dispatching a background alteration job
and restore it while executing the queued callback.

Add regression coverage verifying that the dispatch-time tenant is used
and the worker's previous tenant context is restored.

Fixes #7961

* test(alterations): cover tenant restore on failure and concurrent tenant isolation

Add coverage for the spec lines that were previously untested: the
worker's tenant context is restored after execution even when the
job runner throws, and concurrent jobs dispatched under different
tenants do not exchange tenant context. Extract the shared service
provider / job queue / recording runner arrange logic into
constructor-initialized fields so the three tests stay DRY.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* test(alterations): cover default-tenant dispatch and share dispatcher test setup

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-06 20:07:36 -07:00
..
Elsa.Activities.IntegrationTests [codex] Fix ForEach completion from nested flowchart (#7702) 2026-06-08 12:04:55 +02:00
Elsa.AI.IntegrationTests chore: apply safe dependency upgrades (#7896) 2026-07-26 21:42:27 +02:00
Elsa.Alterations.IntegrationTests fix(alterations): preserve tenant context for background alteration jobs (#7962) 2026-09-06 20:07:36 -07:00
Elsa.Bpmn.IntegrationTests feat(bpmn): adopt Bpmn.* 0.2.0, and start shipping the two BPMN modules (#7970) 2026-08-21 01:44:07 +02:00
Elsa.Bpmn.Interchange.IntegrationTests feat(auth)!: structured authorization model, phases 1-6 (#7980) 2026-08-24 23:44:55 +02:00
Elsa.Common.IntegrationTests Add unit and integration tests for DownloadHttpFile activity (#7094) 2025-11-24 14:37:06 +01:00
Elsa.Diagnostics.ConsoleLogs.IntegrationTests refactor(auth)!: retire the legacy permission constants and duplicate descriptor types (#7987) 2026-08-25 06:04:32 +02:00
Elsa.Diagnostics.OpenTelemetry.IntegrationTests feat(auth)!: structured authorization model, phases 1-6 (#7980) 2026-08-24 23:44:55 +02:00
Elsa.Diagnostics.StructuredLogs.IntegrationTests [codex] Add live server log streaming diagnostics (#7438) 2026-05-11 00:08:52 +02:00
Elsa.Diagnostics.StructuredLogs.Persistence.Sqlite.IntegrationTests Fix SQLite structured log shell lifecycle (#7461) 2026-05-18 01:04:04 +02:00
Elsa.Dsl.ElsaScript.IntegrationTests Adopt the Jint 4.15 host-integration surface: lazy type globals, enum names, and register-what-is-referenced (#7895) 2026-08-17 01:44:03 +02:00
Elsa.ExternalAuthentication.IntegrationTests Support selective role deletion remediation 2026-09-06 03:09:37 +02:00
Elsa.Hosts.SmokeTests test(modular-host): add opt-in role management fixture 2026-09-06 04:25:09 +02:00
Elsa.Http.IntegrationTests Improves HTTP context loss error handling (#7187) 2026-01-12 16:51:30 +01:00
Elsa.JavaScript.IntegrationTests Adopt the Jint 4.15 host-integration surface: lazy type globals, enum names, and register-what-is-referenced (#7895) 2026-08-17 01:44:03 +02:00
Elsa.Resilience.IntegrationTests [codex] Secure Resilience simulate response endpoint (#7505) 2026-05-22 15:27:13 +02:00
Elsa.Workflows.IntegrationTests fix(core): clear stale blocked tokens when a flowchart activity completes (#7993) (#7994) 2026-08-31 00:59:05 +02:00
Directory.Build.props Add coverage enforcement for test projects (#6950) 2025-10-07 19:59:53 +02:00