From 4e22f02434be6632c1123dc65204cc6f3c58edd5 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Wed, 5 Aug 2026 17:48:30 -0400 Subject: [PATCH] test(focas): thread the test cancellation token through the two new Task.Delay waits --- .../FocasFixedTreeAddressingTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Tests/FocasFixedTreeAddressingTests.cs b/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Tests/FocasFixedTreeAddressingTests.cs index f8f4a99a..53ea51da 100644 --- a/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Tests/FocasFixedTreeAddressingTests.cs +++ b/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Tests/FocasFixedTreeAddressingTests.cs @@ -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);