From fcc9c7bf8e10d604ad3580cc78afcf8ffe89e504 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Fri, 10 Jul 2026 06:47:26 -0400 Subject: [PATCH] =?UTF-8?q?test(perf):=20failover-timing=20harness=20place?= =?UTF-8?q?holder=20documenting=20the=2025s=20envelope=20protocol,=20pendi?= =?UTF-8?q?ng=20PLAN-01=20two-node=20rig=20(arch-review=2008=20=C2=A72.3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude-Session: https://claude.ai/code/session_01MtdgwpEeCUn6cUA5f1LMPj --- .../Failover/FailoverTimingTests.cs | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/ZB.MOM.WW.ScadaBridge.PerformanceTests/Failover/FailoverTimingTests.cs diff --git a/tests/ZB.MOM.WW.ScadaBridge.PerformanceTests/Failover/FailoverTimingTests.cs b/tests/ZB.MOM.WW.ScadaBridge.PerformanceTests/Failover/FailoverTimingTests.cs new file mode 100644 index 00000000..9e0e12db --- /dev/null +++ b/tests/ZB.MOM.WW.ScadaBridge.PerformanceTests/Failover/FailoverTimingTests.cs @@ -0,0 +1,33 @@ +namespace ZB.MOM.WW.ScadaBridge.PerformanceTests.Failover; + +/// +/// Failover-timing benchmark harness (placeholder). +/// +/// Design envelope under test (CLAUDE.md "Cluster & Failover"): failure +/// detection 2s heartbeat / 10s threshold, SBR stable-after 15s, total +/// failover ~25s for a hard node loss. +/// +/// Measurement protocol (to be wired to the two-node cluster rig delivered +/// by PLAN-01 — see archreview/plans/PLAN-01-*.md; do not duplicate that rig +/// here): +/// 1. Form a real 2-node cluster (docker/ topology or Akka.Remote in-proc +/// multi-ActorSystem rig from PLAN-01). +/// 2. Confirm a cluster singleton (e.g. site DeploymentManager) is hosted +/// on node A; record T0. +/// 3. Hard-kill node A (process kill / ActorSystem.Abort — not +/// CoordinatedShutdown; graceful stop exercises a different path). +/// 4. Poll node B for singleton re-host; record T1 at first successful +/// response from the migrated singleton. +/// 5. Assert T1 - T0 <= 40s (25s design + margin) and report the number. +/// +public class FailoverTimingTests +{ + [Trait("Category", "Performance")] + [Fact(Skip = "Requires the real two-node failover rig delivered by PLAN-01 " + + "(overall review P2-10). This class documents the measurement " + + "protocol; wire it to the rig when PLAN-01 lands.")] + public void HardKillFailover_SingletonRehostedWithinDesignEnvelope() + { + // Intentionally empty until the PLAN-01 rig exists. + } +}