elsa-core/test
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
..
component Fix semaphore release logic in scheduled task execution (#7045) 2025-11-09 14:14:25 +01:00
integration Add DispatchWorkflow tests with new workflow definitions (#7035) 2025-11-06 20:47:20 +01:00
performance Add coverage enforcement for test projects (#6950) 2025-10-07 19:59:53 +02:00
unit Feat/unit test coverage fork (#7041) 2025-11-07 22:05:57 +01:00
Directory.Build.props Add coverage enforcement for test projects (#6950) 2025-10-07 19:59:53 +02:00