elsa-core/test/component/Elsa.Workflows.ComponentTests
Sipke Schoorstra e2a1b83ec8
Fix semaphore release logic in scheduled task execution (#7045)
* Fix semaphore release logic in scheduled task execution

- Ensure `_executionSemaphore` is only released when acquired.
- Refactor `acquired` variable initialization for better reliability and readability across `ScheduledRecurringTask`, `ScheduledCronTask`, and `ScheduledSpecificInstantTask`.

* Fix test isolation in WorkflowDefinitionActivity cache eviction test (#7046)

* Add thread-safety and resource disposal to `WorkflowDefinitionActivity`

- Introduced `SemaphoreSlim` to ensure thread-safe initialization.
- Implemented `IDisposable` to clean up semaphore resources.

* Introduce thread-safety in `CacheManager` with per-key locking

- Added `ConcurrentDictionary` for managing per-key `SemaphoreSlim` instances.
- Ensured thread-safe `GetOrCreateAsync` operations with key-specific locks.
- Cleaned up unused locks when cache entries are removed.

* Add definition IDs filter to WorkflowDefinitionActivityTests

- Updated `WorkflowInstanceFilter` to include `DefinitionIds` for more precise faulted workflow filtering.
- Improved test coverage for workflow definition scenarios.

* Revert "Introduce thread-safety in `CacheManager` with per-key locking"

This reverts commit cda89d4e6aea1810364cdb0145a59d7b6448bc49.

* Revert "Add thread-safety and resource disposal to `WorkflowDefinitionActivity`"

This reverts commit 08750890a16a8b539941d6d161b4061d2fdbe1b8.

* Remove unnecessary whitespace in WorkflowDefinitionActivityTests
2025-11-09 14:14:25 +01:00
..
Helpers Add BulkDispatchWorkflows tests and improve activity coverage (#7026) 2025-11-04 15:44:44 +01:00
Scenarios Fix semaphore release logic in scheduled task execution (#7045) 2025-11-09 14:14:25 +01:00
Elsa.Workflows.ComponentTests.csproj Restore EF Core persistence layer (#6931) 2025-09-27 20:39:18 +02:00
Elsa.Workflows.ComponentTests.csproj.DotSettings Merge remote-tracking branch 'origin/blueberry' 2024-10-23 16:07:32 +02:00
xunit.runner.json