Skip to content

Commit

Permalink
fix new test for pwsh 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
santisq committed Jun 24, 2024
1 parent 4d10b1a commit 144999c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/PSParallelPipeline.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,14 @@ Describe PSParallelPipeline {
AddScript('0..10 | Invoke-Parallel { Start-Sleep 1; $_ }')
$async = $ps.BeginInvoke()
Start-Sleep 1
$async = $ps.BeginStop($ps.EndStop, $null)

if ($IsCoreCLR) {
$async = $ps.BeginStop($ps.EndStop, $null)
}
else {
$ps.Stop()
}

while (-not $async.AsyncWaitHandle.WaitOne(200)) { }
$timer.Stop()
$timer.Elapsed | Should -BeLessOrEqual ([timespan]::FromSeconds(1.5))
Expand Down

0 comments on commit 144999c

Please sign in to comment.