From 86c48b4ccc2f8f4f7a904a5200e62e897db094f4 Mon Sep 17 00:00:00 2001 From: "Christoph Bergmeister [MVP]" Date: Thu, 16 Jan 2020 20:45:37 +0000 Subject: [PATCH] Increase maximum runspace pool size in flaky test (#1358) --- Tests/Engine/Helper.tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Engine/Helper.tests.ps1 b/Tests/Engine/Helper.tests.ps1 index bd33bfb88..90706c8ca 100644 --- a/Tests/Engine/Helper.tests.ps1 +++ b/Tests/Engine/Helper.tests.ps1 @@ -30,7 +30,7 @@ Describe "Test Directed Graph" { Context "Runspaces should be disposed" { It "Running analyzer 100 times should only create a limited number of runspaces" -Skip:$($PSVersionTable.PSVersion.Major -le 4) { $null = 1..100 | ForEach-Object { Invoke-ScriptAnalyzer -ScriptDefinition 'gci' } - (Get-Runspace).Count | Should -BeLessOrEqual 11 -Because 'Number of Runspaces should not exceed size of runspace pool cache (10) plus the the default runspace pool (1) in CommandInfoCache' + (Get-Runspace).Count | Should -BeLessOrEqual 14 -Because 'Number of Runspaces should be bound (size of runspace pool cache is 10)' } } }