From 0b3b938af5df57a7d63ecc295662f35aa8b7f2ca Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Sat, 13 Jun 2026 11:42:07 -0400 Subject: [PATCH] test(alarms): advise AlarmExtension diagnostics to discover the alarm source attribute --- .../Probes/AlarmSubtagLiveSmokeTests.cs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 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 342756c..19346a4 100644 --- a/src/ZB.MOM.WW.MxGateway.Worker.Tests/Probes/AlarmSubtagLiveSmokeTests.cs +++ b/src/ZB.MOM.WW.MxGateway.Worker.Tests/Probes/AlarmSubtagLiveSmokeTests.cs @@ -380,10 +380,19 @@ public sealed class AlarmSubtagLiveSmokeTests // Advise the alarm subtags (InAlarm/Acked/Priority/AckMsg). consumer.Subscribe(string.Format(@"\\{0}\Galaxy!{1}", Environment.MachineName, Group)); - // Also advise the source attribute so it is an active, writable item - // (MXAccess rejects writes to added-but-not-advised items). - source.Advise(new List { AlarmSourceTag }); - Log("Subscribed + advised source. Pumping to activate items ..."); + // Also advise the source attribute + AlarmExtension diagnostic fields so + // we can discover which attribute actually drives the alarm + // (AlarmSourceAttr names it) before attempting to write. + source.Advise(new List + { + AlarmSourceTag, + AlarmSourceTag + ".AlarmSourceAttr", + AlarmSourceTag + ".Condition", + AlarmSourceTag + ".AlarmMode", + AlarmSourceTag + ".ActiveAlarmState", + AlarmSourceTag + ".DescAttrName", + }); + Log("Subscribed + advised source + diagnostics. Pumping to activate items ..."); PumpFor(TimeSpan.FromSeconds(7)); // Baseline OFF: drive the source false and drain whatever transitions