diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.ControlPlane/ServiceCollectionExtensions.cs b/src/Server/ZB.MOM.WW.OtOpcUa.ControlPlane/ServiceCollectionExtensions.cs index b5caebb5..5fba90b4 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.ControlPlane/ServiceCollectionExtensions.cs +++ b/src/Server/ZB.MOM.WW.OtOpcUa.ControlPlane/ServiceCollectionExtensions.cs @@ -26,7 +26,8 @@ public static class ServiceCollectionExtensions public const string ClusterNodeAddressReconcilerSingletonName = "cluster-node-address-reconciler"; /// - /// Registers all five admin-role cluster singletons + their proxies on the AkkaConfigurationBuilder. + /// Registers the admin-role cluster singletons on the AkkaConfigurationBuilder — five with + /// registry proxies, plus the address reconciler, which is proxy-less because nothing addresses it. /// Must be called against the same builder used by AkkaHostedService so the singletons /// share the host's ActorSystem. /// @@ -94,6 +95,13 @@ public static class ServiceCollectionExtensions // Per-cluster mesh Phase 1: ClusterNode.AkkaPort duplicates the node's own Cluster:Port and // nothing makes them agree. Runs here rather than on each driver node because Phase 4 removes // the driver nodes' ConfigDb connection entirely. + // + // createProxyToo: false — unlike the five singletons above, nothing ever resolves + // ClusterNodeAddressReconcilerKey from the registry. This actor only reads cluster state and + // logs; no one sends it messages. A proxy would be a second actor per node whose only job is + // to hunt for a singleton nobody addresses — visible as the "ClusterSingletonProxy failed to + // find an associated singleton after 30 seconds" startup warning, and as extra cluster + // chatter in every two-node test harness the integration suite builds. builder.WithSingleton( ClusterNodeAddressReconcilerSingletonName, (system, registry, resolver) => @@ -101,7 +109,8 @@ public static class ServiceCollectionExtensions var dbFactory = resolver.GetService>(); return ClusterNodeAddressReconcilerActor.Props(dbFactory); }, - singletonOptions); + singletonOptions, + createProxyToo: false); return builder; } diff --git a/tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/AssemblyInfo.cs b/tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/AssemblyInfo.cs new file mode 100644 index 00000000..9de69500 --- /dev/null +++ b/tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/AssemblyInfo.cs @@ -0,0 +1,14 @@ +using Xunit; + +// Every test in this assembly builds a real two-node Akka cluster: two in-process Kestrel hosts, +// two ActorSystems with remoting on ephemeral ports, six admin-role cluster singletons, an EF +// context and a deploy pipeline. Running several of those concurrently — on top of the other test +// assemblies dotnet test runs in parallel — starves the cluster-formation and ApplyAck timers these +// tests measure, so failures appear under full-suite load and vanish in isolation. +// +// That was tolerable while the deploy path sealed immediately on an empty expected-ack set. Since +// per-cluster mesh Phase 1 the coordinator waits for a real ack from every configured node, so these +// tests now measure an end-to-end round-trip and are correspondingly more sensitive to CPU +// starvation. Serialising this assembly trades wall-clock for determinism; the assembly is a handful +// of heavyweight E2E tests, not a broad unit suite. +[assembly: CollectionBehavior(DisableTestParallelization = true)]