elsa-core/test/unit
Copilot 40a7583f62
Fix spurious duplicate activity registry warnings during startup (#7183)
* Initial plan

* Fix: Remove bogus duplicate activity registry warnings during refresh

The ActivityRegistry.RefreshDescriptorsAsync() method was starting with existing descriptors, causing false warnings when intentionally repopulating the registry. Now starts fresh but preserves manual descriptors.

Co-authored-by: KnibbsyMan <23156317+KnibbsyMan@users.noreply.github.com>

* Add tests for ActivityRegistry refresh behavior

Added comprehensive tests to verify:
1. No warnings logged during intentional registry refresh
2. Manual descriptors preserved during refresh
3. True duplicates from different providers still logged

Co-authored-by: KnibbsyMan <23156317+KnibbsyMan@users.noreply.github.com>

* Apply code review feedback: track manual descriptors in providersDictionary and clarify comments

- Track _manualActivityDescriptors in providersDictionary under GetType() key for consistency
- Clarify comments to be more specific about GetType() provider and RegisterAsync(Type activityType) method
- Avoid duplicate entries in provider list when descriptor already preserved

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Minor style improvement: use Count > 0 instead of !Count.Equals(0)

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: KnibbsyMan <23156317+KnibbsyMan@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
2026-01-16 12:14:24 +01:00
..
Elsa.Activities.UnitTests Improves HTTP context loss error handling (#7187) 2026-01-12 16:51:30 +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 Fix spurious duplicate activity registry warnings during startup (#7183) 2026-01-16 12:14:24 +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