Skip to content

Commit

Permalink
one more pester test
Browse files Browse the repository at this point in the history
  • Loading branch information
santisq committed Jul 3, 2024
1 parent 04ce513 commit 57430ef
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/PSParallelPipeline.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,18 @@ Describe PSParallelPipeline {
} | Should -Throw -ExceptionType ([TimeoutException])
$timer.Stop()
$timer.Elapsed | Should -BeLessOrEqual ([timespan]::FromSeconds(2.2))
$timer.Restart()
{
$invokeParallelSplat = @{
ThrottleLimit = 5
TimeOutSeconds = 1
ErrorAction = 'Stop'
ScriptBlock = { Start-Sleep 10 }
}
1..100 | Invoke-Parallel @invokeParallelSplat
} | Should -Throw -ExceptionType ([TimeoutException])
$timer.Stop()
$timer.Elapsed | Should -BeLessOrEqual ([timespan]::FromSeconds(1.2))
}
}
}
Expand Down

0 comments on commit 57430ef

Please sign in to comment.