test(grpc-data): A4 manifest entry; condition-access tests wait for the barrier's RefreshRequired, not the barrier count

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-11-24 23:11:39 -05:00
parent f1f9f49813
commit 969f3d4645
2 changed files with 34 additions and 3 deletions
@@ -1182,5 +1182,32 @@
"GrpcDataV1RealOriginCompatibilityTests"
]
}
],
"A4": [
{
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
"filter": "(Feature=GrpcData&Phase=A4)|FullyQualifiedName~.GrpcDataProjectedConditionAccessTests.|FullyQualifiedName~.GrpcDataProjectedConditionMethodTests.|FullyQualifiedName~.GrpcDataConditionStreamTests.|FullyQualifiedName~.GrpcDataDiagnosticsSerializationTests.",
"new_classes": [
"GrpcDataConditionDiagnosticsTests",
"GrpcDataConditionDiagnosticsSerializationTests"
],
"existing_classes": [
"GrpcDataProjectedConditionAccessTests",
"GrpcDataProjectedConditionMethodTests",
"GrpcDataConditionStreamTests",
"GrpcDataDiagnosticsSerializationTests"
]
},
{
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/ZB.MOM.WW.OtOpcUa.AdminUI.Tests.csproj",
"filter": "(Feature=GrpcData&Phase=A4)|FullyQualifiedName~.GrpcDataHistoryDiagnosticsDisplayTests.|FullyQualifiedName~.GrpcDataDiagnosticsTests.",
"new_classes": [
"GrpcDataConditionDiagnosticsDisplayTests"
],
"existing_classes": [
"GrpcDataHistoryDiagnosticsDisplayTests",
"GrpcDataDiagnosticsTests"
]
}
]
}
@@ -141,6 +141,7 @@ public sealed class GrpcDataProjectedConditionAccessTests
stream.Complete("map-b");
await f.WaitAsync(() => f.Sink.Applied.Count == 1);
f.Access.MappingStatuses(Connection)!["map-a"].ShouldBe(ProjectedConditionMappingStatus.Unavailable);
await f.WaitAsync(() => f.Sink.RefreshRequired >= 1); // the barrier applies before it asks for the refresh
f.Sink.RefreshRequired.ShouldBe(1);
}
@@ -317,6 +318,7 @@ public sealed class GrpcDataProjectedConditionAccessTests
stream.Records("map-b", Record(Key("x"), 3));
stream.Complete("map-b");
await f.WaitAsync(() => f.Sink.Applied.Count == 1);
await f.WaitAsync(() => f.Sink.RefreshRequired >= 1); // the barrier applies before it asks for the refresh
f.Sink.RefreshRequired.ShouldBe(1, "S7: an incomplete barrier from a non-Good ack also requires refresh");
// #930 N2: the retry is IN-STREAM (the item re-added after the bounded wait) — the stream is not ended for it.
await f.WaitAsync(() => stream.AddsOf("map-a") == 1);
@@ -555,8 +557,7 @@ public sealed class GrpcDataProjectedConditionAccessTests
first.Begin("map-b", total: 1);
first.Records("map-b", Record(Key("x"), 3));
first.Complete("map-b");
await f.WaitAsync(() => f.Access.BarriersCompleted(Connection) == 1);
f.Sink.RefreshRequired.ShouldBe(1);
await f.WaitAsync(() => f.Sink.RefreshRequired == 1);
first.End();
var second = await f.NextStreamAsync();
@@ -570,7 +571,10 @@ public sealed class GrpcDataProjectedConditionAccessTests
var third = await f.NextStreamAsync();
third.Ack(DataItemStatus.Denied, "map-a", "map-b"); // a changed incomplete set ⇒ told again (positive control)
await f.WaitAsync(() => f.Access.BarriersCompleted(Connection) == 3);
// The barrier count moves before the barrier's RefreshRequired, so wait for the refresh itself. It is also the positive
// control for the second stream's absence: had that barrier asked, this would read 3.
await f.WaitAsync(() => f.Sink.RefreshRequired >= 2);
await Task.Delay(100, TestContext.Current.CancellationToken);
f.Sink.RefreshRequired.ShouldBe(2);
}