test(focas): thread the test cancellation token through the two new Task.Delay waits
This commit is contained in:
@@ -40,7 +40,7 @@ public sealed class FocasFixedTreeAddressingTests
|
||||
while (DateTime.UtcNow < deadline)
|
||||
{
|
||||
if (predicate()) return true;
|
||||
await Task.Delay(25);
|
||||
await Task.Delay(25, TestContext.Current.CancellationToken);
|
||||
}
|
||||
return predicate();
|
||||
}
|
||||
@@ -150,7 +150,7 @@ public sealed class FocasFixedTreeAddressingTests
|
||||
new FocasTagDefinition("raw/Run", Host, "R100", FocasDataType.Byte));
|
||||
|
||||
await drv.InitializeAsync("{}", CancellationToken.None);
|
||||
await Task.Delay(300);
|
||||
await Task.Delay(300, TestContext.Current.CancellationToken);
|
||||
|
||||
drv.GetDeviceState(Host)!.FixedTreeCache.ShouldBeNull();
|
||||
await drv.ShutdownAsync(CancellationToken.None);
|
||||
|
||||
Reference in New Issue
Block a user