test: remaining xUnit1051/1031/1030, CS8602/8604, CS0618, CS0219, CS0649, NU1510 fixes (lmxopcua#725)
v2-ci / unit-tests (push) Has been cancelled
v2-ci / unit-tests (push) Has been cancelled
Awaited deadline oracles get the runner token; sync-over-async tests made async; nullable child models asserted via ShouldNotBeNull() return values; obsolete SDK ctors replaced with the telemetry overloads; dead locals/fixture and the redundant DI PackageReference removed. No suppressions. Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
+4
-4
@@ -35,7 +35,7 @@ public sealed class EventPumpStreamFaultTests
|
||||
// Drop the gw stream — RunAsync's await foreach throws.
|
||||
subscriber.FaultStream(new IOException("simulated gateway transport drop"));
|
||||
|
||||
var completed = await Task.WhenAny(faultObserved.Task, Task.Delay(WaitMs));
|
||||
var completed = await Task.WhenAny(faultObserved.Task, Task.Delay(WaitMs, TestContext.Current.CancellationToken));
|
||||
completed.ShouldBe(faultObserved.Task,
|
||||
"EventPump must invoke onStreamFault when the gw StreamEvents stream faults");
|
||||
(await faultObserved.Task).ShouldBeOfType<IOException>();
|
||||
@@ -69,9 +69,9 @@ public sealed class EventPumpStreamFaultTests
|
||||
|
||||
subscriber.FaultStream(new IOException("simulated gateway transport drop"));
|
||||
|
||||
(await Task.WhenAny(reopenRan.Task, Task.Delay(WaitMs))).ShouldBe(reopenRan.Task,
|
||||
(await Task.WhenAny(reopenRan.Task, Task.Delay(WaitMs, TestContext.Current.CancellationToken))).ShouldBe(reopenRan.Task,
|
||||
"stream fault must trigger the supervisor's reopen path");
|
||||
(await Task.WhenAny(replayRan.Task, Task.Delay(WaitMs))).ShouldBe(replayRan.Task,
|
||||
(await Task.WhenAny(replayRan.Task, Task.Delay(WaitMs, TestContext.Current.CancellationToken))).ShouldBe(replayRan.Task,
|
||||
"stream fault must trigger the supervisor's replay path");
|
||||
|
||||
await supervisor.WaitForHealthyAsync(new CancellationTokenSource(WaitMs).Token);
|
||||
@@ -114,7 +114,7 @@ public sealed class EventPumpStreamFaultTests
|
||||
|
||||
await resubscribed.EmitAsync(itemHandle: 7, value: 123.0);
|
||||
|
||||
var completed = await Task.WhenAny(resumed.Task, Task.Delay(WaitMs));
|
||||
var completed = await Task.WhenAny(resumed.Task, Task.Delay(WaitMs, TestContext.Current.CancellationToken));
|
||||
completed.ShouldBe(resumed.Task,
|
||||
"a fresh EventPump created after a fault must resume dispatching OnDataChange");
|
||||
(await resumed.Task).FullReference.ShouldBe("Tank.Level");
|
||||
|
||||
Reference in New Issue
Block a user