From 1ccc237cb630e79d4681001ca893a4f3ce7b7332 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Sat, 18 Jul 2026 12:19:50 -0400 Subject: [PATCH] docs(test): record why these assert descriptors, not a built provider 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. --- .../SecretsReplicationRegistrationTests.cs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/SecretsReplicationRegistrationTests.cs b/tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/SecretsReplicationRegistrationTests.cs index 974dadba..cbaee73c 100644 --- a/tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/SecretsReplicationRegistrationTests.cs +++ b/tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/SecretsReplicationRegistrationTests.cs @@ -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.