docs(test): record why these assert descriptors, not a built provider
v2-ci / build (push) Successful in 4m21s
v2-ci / unit-tests (push) Failing after 10m15s

Akka.TestKit is the family convention for non-end-to-end Akka testing and would
be the right tool here, but Akka.TestKit.Xunit2 is xunit-v2-only and this project
is on xunit.v3 - adding it produces CS0433 type conflicts. Directory.Packages.props
already documents the same constraint for the three projects deliberately held on
xunit v2 for TestKit. Revisit when Akka ships an xunit.v3 TestKit.
This commit is contained in:
Joseph Doherty
2026-07-18 12:19:50 -04:00
parent b3d1a26f38
commit 1ccc237cb6
@@ -106,11 +106,20 @@ public sealed class SecretsReplicationRegistrationTests
// Asserted on the ServiceCollection rather than a built provider, deliberately. Resolving
// ISecretStore with replication on constructs ReplicatingSecretStore, which resolves
// ISecretReplicator, which eagerly spawns the replication actor, whose PreStart calls
// DistributedPubSub.Get(...). That needs a joined cluster, so a provider-based assertion
// HANGS here rather than failing. Standing a real cluster up inside this assembly was
// attempted and does not work; the library's own TwoNodeClusterReplicationTests already
// cover actor creation and convergence against a genuine 2-node cluster, so duplicating
// that here buys nothing.
// DistributedPubSub.Get(...) — unavailable until the node has joined a cluster. Against a
// plain ActorSystem that resolve hangs instead of failing.
//
// Akka.TestKit is the family convention for this (ScadaBridge's suites use it throughout)
// and would be the right tool, but it is NOT available here: Akka.TestKit.Xunit2 is
// xunit-v2-only, and this project is one of the 44 on xunit.v3. Adding it yields CS0433
// type conflicts. Directory.Packages.props documents the same constraint — AdminUI.Tests,
// ControlPlane.Tests and Runtime.Tests are deliberately held on xunit v2 precisely because
// no xunit.v3 TestKit ships as of Akka 1.5.62. Host wiring tests belong here, not in one of
// those three, so the descriptor is the right seam until Akka ships a v3 TestKit.
//
// Nothing is lost: the registration order IS the defect, and the library's own
// TwoNodeClusterReplicationTests already cover actor creation and convergence against a
// genuine 2-node cluster.
//
// AddSingleton (not TryAdd) appends the decorator, and the LAST registration for a service
// type is what the container resolves.