diff --git a/tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/TwoNodeClusterHarness.cs b/tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/TwoNodeClusterHarness.cs index 15175be0..cd18796f 100644 --- a/tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/TwoNodeClusterHarness.cs +++ b/tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/TwoNodeClusterHarness.cs @@ -204,15 +204,22 @@ public sealed class TwoNodeClusterHarness : IAsyncDisposable } /// - /// Gracefully shuts down node B via , which runs - /// CoordinatedShutdown → Cluster.Leave. Node A sees the member transition to Removed within - /// a couple of seconds. Use this for failover scenarios; call - /// to bring it back on the same Akka port. + /// Gracefully shuts node B down, so CoordinatedShutdown runs and the node performs a + /// Cluster.Leave; node A sees the member transition to Removed within a couple of seconds. + /// Use this for failover scenarios; call to bring it back on + /// the same Akka port. /// + /// + /// This used to call DisposeAsync alone, on the stated belief that disposal "runs + /// CoordinatedShutdown". It does not — see . A disposed-but-never- + /// stopped node never leaves the cluster gracefully; node A only notices once the failure + /// detector times it out, which is a slower and materially different path from the graceful + /// leave these failover tests mean to exercise. + /// public async Task StopNodeBAsync() { if (NodeB is null) return; - await NodeB.DisposeAsync(); + await ShutDownAsync(NodeB); NodeB = null!; }