diff --git a/tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/OpcUa/OpcUaPublishActorConditionKnownTests.cs b/tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/OpcUa/OpcUaPublishActorConditionKnownTests.cs index 7ff53d4f4..523a0e65c 100644 --- a/tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/OpcUa/OpcUaPublishActorConditionKnownTests.cs +++ b/tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/OpcUa/OpcUaPublishActorConditionKnownTests.cs @@ -36,8 +36,9 @@ public sealed class OpcUaPublishActorConditionKnownTests : RuntimeActorTestBase actor.Tell(new OpcUaPublishActor.AlarmStateUpdate("al-1", Active, DateTime.UtcNow, AddressSpaceRealm.Uns, Src)); actor.Tell(new OpcUaPublishActor.MarkConditionsKnown(Src, ["al-1"], AddressSpaceRealm.Uns)); - AwaitAssert(() => sink.IsKnown("al-1").ShouldBeTrue(), PlanBudget, cancellationToken: TestContext.Current.CancellationToken); - sink.Log.ShouldBe(["alarm:al-1:True", "known:al-1"]); + // Await the LOG, not IsKnown: the fake's alarm write already sets known, so IsKnown could pass before the mark + // landed (observed flaking under load). + AwaitAssert(() => sink.Log.ShouldBe(["alarm:al-1:True", "known:al-1"]), PlanBudget, cancellationToken: TestContext.Current.CancellationToken); } /// T2 (iv) at the publish actor: the apply is artificially delayed (the plan is held open); the alarm and