This commit is contained in:
+1
-1
@@ -138,7 +138,7 @@ public sealed class ModbusBackgroundLoopTokenLifetimeTests
|
||||
|
||||
gate.ArmedSchedules.ShouldBe(1, "exactly one task (the background loop) must be scheduled by initialize; anything else is ambiguous");
|
||||
var probeTask = Field<Task>(drv, taskField);
|
||||
probeTask.ShouldNotBeNull();
|
||||
Assert.NotNull(probeTask); // not Shouldly: its Task overload would be an un-awaited async assertion
|
||||
|
||||
await gate.Started.Task.WaitAsync(Bound, TestContext.Current.CancellationToken);
|
||||
probeTask.IsCompleted.ShouldBeFalse("the worker must be parked after its start check, before its delegate runs");
|
||||
|
||||
Reference in New Issue
Block a user