From 393e326275fa0851333991bbcbd80c47f9f81d6d Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Sun, 14 Jun 2026 02:35:59 -0400 Subject: [PATCH] docs(alarms): note operator/IDE toggle drives the live subtag smoke test C6a: the rig's TestAlarm attributes are object-driven; a flip script OR a manual operator/IDE toggle drives them (confirmed live 2026-06-14). Update the how-to-run comments and Skip reason accordingly. --- .../Probes/AlarmSubtagLiveSmokeTests.cs | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/ZB.MOM.WW.MxGateway.Worker.Tests/Probes/AlarmSubtagLiveSmokeTests.cs b/src/ZB.MOM.WW.MxGateway.Worker.Tests/Probes/AlarmSubtagLiveSmokeTests.cs index 41ff65a..ce9b3ac 100644 --- a/src/ZB.MOM.WW.MxGateway.Worker.Tests/Probes/AlarmSubtagLiveSmokeTests.cs +++ b/src/ZB.MOM.WW.MxGateway.Worker.Tests/Probes/AlarmSubtagLiveSmokeTests.cs @@ -16,9 +16,12 @@ // 1. On the dev rig with AVEVA System Platform installed and Galaxy running: // $env:MXGATEWAY_RUN_LIVE_MXACCESS_TESTS = "1" // 2. Remove (or set to null) the Skip parameter on the [Fact] below. -// 3. Run with an alarm flip script (same one used by AlarmsLiveSmokeTests) -// so that TestMachine_001.TestAlarm001 toggles its Active/Acked subtags -// on a ~10 s cadence. +// 3. Drive a TestMachine alarm so its Active/Acked subtags toggle — either an +// alarm flip script (same one used by AlarmsLiveSmokeTests, ~10 s cadence) +// or a manual operator/IDE toggle of the alarm attribute. The rig's +// TestAlarm attributes are object-driven, so an external MXAccess Write +// cannot toggle them (confirmed live 2026-06-14 by toggling TestAlarm002 +// from the IDE). // // net48/x86 constraints: // - No init-only properties, records, index/range operators, C# 8+ pattern @@ -49,8 +52,9 @@ namespace ZB.MOM.WW.MxGateway.Worker.Tests.Probes; /// writes the /// ack-comment subtag (AckMsg) successfully. /// -/// Skip-gated; flip Skip=null on the dev rig with the alarm flip -/// script running. The remaining live-validation item is confirming that +/// Skip-gated; flip Skip=null on the dev rig with an alarm being +/// driven (flip script or a manual operator/IDE toggle of the alarm +/// attribute). The remaining live-validation item is confirming that /// the runtime MXAccess item reference path requires no intermediate /// alarm-condition segment (i.e. <Object>.<AlarmAttr>.InAlarm /// resolves as-is). @@ -117,7 +121,7 @@ public sealed class AlarmSubtagLiveSmokeTests /// the Degraded flag and synthetic GUID are stamped, then /// AcknowledgeByName and verifies the ack-comment write returns 0. /// - [Fact(Skip = "Live dev-rig smoke test — flip Skip=null with AVEVA + an alarm flip script running. Subtag fallback path. Field names confirmed (InAlarm/Acked/AckMsg/Priority); live-validate runtime path resolves without intermediate alarm-condition segment.")] + [Fact(Skip = "Live dev-rig smoke test — flip Skip=null with AVEVA + an alarm being driven (flip script or manual operator/IDE toggle of the alarm attribute). Subtag fallback path. Field names confirmed (InAlarm/Acked/AckMsg/Priority); live-validate runtime path resolves without intermediate alarm-condition segment.")] public void SubtagFallback_FullPipelineRoundTrip_SynthesizesRaiseAndAcknowledges() { Exception? threadException = null; @@ -342,9 +346,10 @@ public sealed class AlarmSubtagLiveSmokeTests consumer.Subscribe(subscriptionExpression); Log("Subscribe returned OK."); - // 1. Wait for a Raise transition. The alarm flip script (same one - // used by AlarmsLiveSmokeTests) writes the active subtag on a - // ~10 s cadence. LmxSubtagAlarmSource delivers OnDataChange via + // 1. Wait for a Raise transition. Whatever is driving the alarm — a + // flip script (same one used by AlarmsLiveSmokeTests, ~10 s cadence) + // or a manual operator/IDE toggle — writes the active subtag. + // LmxSubtagAlarmSource delivers OnDataChange via // the Windows message pump on the STA, so we must pump messages // here while we wait — mirroring how AlarmsLiveSmokeTests drives // its WnWrapAlarmConsumer.PollOnce() from the STA in a tight loop.