Skip to content

Commit 144999c

Browse files
committed
fix new test for pwsh 5.1
1 parent 4d10b1a commit 144999c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/PSParallelPipeline.tests.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,14 @@ Describe PSParallelPipeline {
245245
AddScript('0..10 | Invoke-Parallel { Start-Sleep 1; $_ }')
246246
$async = $ps.BeginInvoke()
247247
Start-Sleep 1
248-
$async = $ps.BeginStop($ps.EndStop, $null)
248+
249+
if ($IsCoreCLR) {
250+
$async = $ps.BeginStop($ps.EndStop, $null)
251+
}
252+
else {
253+
$ps.Stop()
254+
}
255+
249256
while (-not $async.AsyncWaitHandle.WaitOne(200)) { }
250257
$timer.Stop()
251258
$timer.Elapsed | Should -BeLessOrEqual ([timespan]::FromSeconds(1.5))

0 commit comments

Comments
 (0)