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(); }