From b57595cb4afaa85f5423adc43ed5e65dbe057889 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Tue, 10 Nov 2026 13:15:16 -0500 Subject: [PATCH] test(opcua): distinguish rejected diagnostic samples from passing resource evidence --- .../Sdk2LifecycleSoakTests.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests/Sdk2LifecycleSoakTests.cs b/tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests/Sdk2LifecycleSoakTests.cs index 560ad263..e5fa50b7 100644 --- a/tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests/Sdk2LifecycleSoakTests.cs +++ b/tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests/Sdk2LifecycleSoakTests.cs @@ -103,7 +103,7 @@ public sealed class Sdk2LifecycleSoakTests await ExerciseAsync(rig, config, ++cycles, evidence, ct); await EventuallyAsync(() => PublicCounts(rig) == (0, 0, 0), ct); var sample = await CaptureAsync(rig, config.CertificateManager, watch.Elapsed, cycles, clientRoot, serverRoot, ct); - // Retain the failing observation too; only the later quiescent row proves every gate passed. + // Retain the failing observation too; rejected diagnostic rows never count as passing quiescent samples. await LogAsync(evidence, new { kind = "resource-observation", resources = sample }); sample.Sessions.ShouldBe(0); sample.Subscriptions.ShouldBe(0); sample.Items.ShouldBe(0); sample.BrowsePoints.ShouldBe(0); sample.HistoryPoints.ShouldBe(0); @@ -128,7 +128,7 @@ public sealed class Sdk2LifecycleSoakTests // Investigative sampling may continue after rejection, but can never turn it into a pass. firstRejectedBudget = ExceptionDispatchInfo.Capture(error); await LogAsync(evidence, new { kind = "budget-rejected", cycle = cycles, - seconds = watch.Elapsed.TotalSeconds, resources = sample, baseline }); + seconds = watch.Elapsed.TotalSeconds, resources = sample, baseline, failure = error.ToString() }); } } retained.Enqueue(sample); @@ -141,7 +141,8 @@ public sealed class Sdk2LifecycleSoakTests "retained managed memory must not grow monotonically across 24 quiescent cycles"); } } - await LogAsync(evidence, new { kind = "quiescent", cycleSeconds = cycle.Elapsed.TotalSeconds, resources = sample }); + await LogAsync(evidence, new { kind = firstRejectedBudget is null ? "quiescent" : "quiescent-budget-rejected", + cycleSeconds = cycle.Elapsed.TotalSeconds, resources = sample }); if (cycles % 4 == 0) { var restart = Stopwatch.StartNew();