Skip to content

Commit 57430ef

Browse files
committed
one more pester test
1 parent 04ce513 commit 57430ef

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/PSParallelPipeline.tests.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,18 @@ Describe PSParallelPipeline {
150150
} | Should -Throw -ExceptionType ([TimeoutException])
151151
$timer.Stop()
152152
$timer.Elapsed | Should -BeLessOrEqual ([timespan]::FromSeconds(2.2))
153+
$timer.Restart()
154+
{
155+
$invokeParallelSplat = @{
156+
ThrottleLimit = 5
157+
TimeOutSeconds = 1
158+
ErrorAction = 'Stop'
159+
ScriptBlock = { Start-Sleep 10 }
160+
}
161+
1..100 | Invoke-Parallel @invokeParallelSplat
162+
} | Should -Throw -ExceptionType ([TimeoutException])
163+
$timer.Stop()
164+
$timer.Elapsed | Should -BeLessOrEqual ([timespan]::FromSeconds(1.2))
153165
}
154166
}
155167
}

0 commit comments

Comments
 (0)