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