From 8a60502418eede21a19feb549580f7577b92b386 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); }