From 5c91188c9bed54ca612a8ce8abd78f28cd914e07 Mon Sep 17 00:00:00 2001 From: Dan Siegel Date: Fri, 3 Nov 2023 16:44:59 -0600 Subject: [PATCH] test: add delay for CancellationToken to take effect --- tests/Prism.Core.Tests/Commands/AsyncDelegateCommandFixture.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Prism.Core.Tests/Commands/AsyncDelegateCommandFixture.cs b/tests/Prism.Core.Tests/Commands/AsyncDelegateCommandFixture.cs index ff1ef506f8..da4a5ad2d7 100644 --- a/tests/Prism.Core.Tests/Commands/AsyncDelegateCommandFixture.cs +++ b/tests/Prism.Core.Tests/Commands/AsyncDelegateCommandFixture.cs @@ -129,6 +129,7 @@ public async Task ICommandExecute_UsesDefaultTokenSourceFactory() Assert.True(command.IsExecuting); cts.Cancel(); + await Task.Delay(10); Assert.False(command.IsExecuting); }