review(Core.Abstractions): document ReadEventsAsync continuation contract (OpcUaServer-002 root)

Re-review at 7286d320. Core.Abstractions-009: ReadEventsAsync maxEvents<=0 sentinel now
documents the implementer's continuation-point obligation when a backend cap truncates
(the root of OpcUaServer-002). -010: PollGroupEngineTests pass CancellationToken. Plus
EquipmentTagRefResolver.TryResolve [MaybeNullWhen(false)] NRT cleanup + test.
This commit is contained in:
Joseph Doherty
2026-06-19 11:06:56 -04:00
parent 354b0e7613
commit 65e6af6001
7 changed files with 135 additions and 12 deletions
@@ -65,7 +65,7 @@ public sealed class PollGroupEngineTests
(h, r, s) => events.Enqueue((h, r, s)));
var handle = engine.Subscribe(["X"], TimeSpan.FromMilliseconds(100));
await Task.Delay(500);
await Task.Delay(500, TestContext.Current.CancellationToken);
engine.Unsubscribe(handle);
events.Count.ShouldBe(1);
@@ -108,7 +108,7 @@ public sealed class PollGroupEngineTests
var afterUnsub = events.Count;
src.Values["X"] = 999;
await Task.Delay(400);
await Task.Delay(400, TestContext.Current.CancellationToken);
events.Count.ShouldBe(afterUnsub);
}
@@ -125,7 +125,7 @@ public sealed class PollGroupEngineTests
minInterval: TimeSpan.FromMilliseconds(200));
var handle = engine.Subscribe(["X"], TimeSpan.FromMilliseconds(5));
await Task.Delay(300);
await Task.Delay(300, TestContext.Current.CancellationToken);
engine.Unsubscribe(handle);
// 300 ms window, 200 ms floor, stable value → initial push + at most 1 extra poll.
@@ -243,7 +243,7 @@ public sealed class PollGroupEngineTests
engine.ActiveSubscriptionCount.ShouldBe(0);
var afterDispose = events.Count;
await Task.Delay(300);
await Task.Delay(300, TestContext.Current.CancellationToken);
// After dispose no more events — everything is cancelled.
events.Count.ShouldBe(afterDispose);
}
@@ -277,7 +277,7 @@ public sealed class PollGroupEngineTests
var handle = engine.Subscribe(["A"], TimeSpan.FromMilliseconds(50));
// Allow several poll cycles so a broken implementation would accumulate extra events.
await Task.Delay(400);
await Task.Delay(400, TestContext.Current.CancellationToken);
engine.Unsubscribe(handle);
// Only the initial-data push should have fired; subsequent polls with identical