From 57430ef103f536ed30c819c431a2e034c8b845e3 Mon Sep 17 00:00:00 2001
From: Santiago Squarzon <squarzon.santiago@gmail.com>
Date: Wed, 3 Jul 2024 14:29:39 -0300
Subject: [PATCH] one more pester test

---
 tests/PSParallelPipeline.tests.ps1 | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tests/PSParallelPipeline.tests.ps1 b/tests/PSParallelPipeline.tests.ps1
index 49bf4be..c88e609 100644
--- a/tests/PSParallelPipeline.tests.ps1
+++ b/tests/PSParallelPipeline.tests.ps1
@@ -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))
             }
         }
     }