Skip to content

Commit

Permalink
Increase maximum runspace pool size in flaky test (#1358)
Browse files Browse the repository at this point in the history
  • Loading branch information
bergmeister committed Jan 16, 2020
1 parent 0ed1c8b commit 86c48b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tests/Engine/Helper.tests.ps1
Expand Up @@ -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)'
}
}
}

0 comments on commit 86c48b4

Please sign in to comment.