From 45a3eee9c86d527b41ca145a066d1e4f1434f6c4 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Tue, 24 Nov 2026 12:42:17 -0500 Subject: [PATCH] =?UTF-8?q?test(grpc-data):=20A2a=20=E2=80=94=20revocation?= =?UTF-8?q?=20test=20awaits=20the=20worker=20teardown;=20README=20conditio?= =?UTF-8?q?ns=20profile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/validation/grpc-data/README.md | 10 ++++++++++ .../DataConnections/GrpcDataConditionStreamTests.cs | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/validation/grpc-data/README.md b/scripts/validation/grpc-data/README.md index 003edf5d3..1bad3acdd 100644 --- a/scripts/validation/grpc-data/README.md +++ b/scripts/validation/grpc-data/README.md @@ -93,6 +93,16 @@ the consumer's connection and exports, and seeds a second principal `fixture-noh the probe's `--scenario history` origin RPCs, the CLI `historyread` and the CONSUMER `history` node-probe operation, and checks value parity. Without `--history` the rig, the seed and every D-scenario are unchanged. +## A2a conditions profile (opt-in) + +`rig.py up --run-id --conditions` adds `compose.conditions.yml`: the seeder grants `AlarmSubscribe` on both SOURCE exports +and adds one scripted alarm, `ScalarHigh` (`modbus/plc/scalar > 100`), on the SOURCE equipment. The dev +`DataConnections__ConditionKeySecret` is already set on both `source-*` services. `python3 scripts/validation/grpc-data/conditions_smoke.py +--run-id ` raises the alarm through the device control API (register 20 := 150), then runs the probe's `--scenario conditions` +on both SOURCE listeners: the Primary must stream a snapshot (`total`, the active record, `snapshot_complete`) and, after the +probe clears the alarm, a delta; the Secondary must refuse the condition item (`Unavailable`, Primary-only). Without +`--conditions` the rig, the seed and every D-scenario are unchanged. + ## H3 projected-history gate (opt-in) `rig.py up --run-id --history [--history-backend sqlserver|questdb]` — `questdb` layers `compose.history.questdb.yml`: diff --git a/tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataConditionStreamTests.cs b/tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataConditionStreamTests.cs index 31cb83241..38095af3d 100644 --- a/tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataConditionStreamTests.cs +++ b/tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/DataConnections/GrpcDataConditionStreamTests.cs @@ -149,7 +149,8 @@ public sealed class GrpcDataConditionStreamTests var after = await stream.DrainAsync(f); after.OfType().SelectMany(x => x.Items).Count().ShouldBeLessThan(400); stream.Ended.ShouldBeTrue("a revoked condition item ends the stream, like a revoked v1 value item"); - // Frames already prepared before the revocation are bounded by the queue; nothing is produced after it. + // The worker's teardown (after the reader ended) releases the condition item. + await stream.Session.Completion.WaitAsync(TimeSpan.FromSeconds(10), Ct); f.StreamOf(stream, allowMissing: true).ShouldBeNull(); }