elsa-core/test/unit
Sipke Schoorstra b577279321
Improves tenant task management with dependencies (#7174)
* Consolidate tenant task lifecycle logic into `TenantTaskManager` and remove obsolete task event handlers (`RunStartupTasks`, `RunBackgroundTasks`, `StartRecurringTasks`). Introduce `TopologicalTaskSorter` for dependency-based task execution.

* Handles multiple tasks of the same type

Updates the topological task sorter to handle multiple tasks of the same type.

Previously, the sorter assumed a one-to-one mapping between task types and task instances, which caused issues when multiple tasks of the same type were present.
Now, it groups tasks by type and adds them to the result in the correct order.

* Add unit tests for `TopologicalTaskSorter`

Introduce `Elsa.Common.UnitTests` project with comprehensive test coverage for `TopologicalTaskSorter`, including dependency resolution, circular dependency handling, and task ordering scenarios. Update `Elsa.sln` to include the new test project.

* Update src/modules/Elsa.Common/Multitenancy/EventHandlers/TenantTaskManager.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Unwrap background task continuation in `TenantTaskManager` to ensure proper task execution tracking.

* Update src/modules/Elsa.Common/Helpers/TopologicalTaskSorter.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Refactor `TryGet` method to prioritize memory register lookup and update `Output` constructor to use `MemoryBlockReference`.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-29 20:49:24 +01:00
..
Elsa.Activities.UnitTests Configures Flowchart Execution via DI (#7141) 2025-12-15 10:15:39 +01:00
Elsa.Common.UnitTests Improves tenant task management with dependencies (#7174) 2025-12-29 20:49:24 +01:00
Elsa.Expressions.UnitTests Add code coverage configuration and adjust test projects (#7049) 2025-11-12 13:59:36 +01:00
Elsa.Http.UnitTests Add Elsa Script DSL (#7076) 2025-11-25 19:57:50 +01:00
Elsa.Resilience.Core.UnitTests Enhances distributed lock handling with resilience (#7161) 2025-12-29 19:53:48 +01:00
Elsa.Scheduling.UnitTests Add Elsa Script DSL (#7076) 2025-11-25 19:57:50 +01:00
Elsa.Workflows.Core.UnitTests Added logic to search for workflow-as-activities based on DefinitionId (not only versionId) (#7149) 2025-12-17 23:23:49 +01:00
Elsa.Workflows.Management.UnitTests Add code coverage configuration and adjust test projects (#7049) 2025-11-12 13:59:36 +01:00
Elsa.Workflows.Runtime.UnitTests Add code coverage configuration and adjust test projects (#7049) 2025-11-12 13:59:36 +01:00
Directory.Build.props Add coverage enforcement for test projects (#6950) 2025-10-07 19:59:53 +02:00