-
Type:
Bug
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: PowerShell 2.0.3
-
Component/s: powershell
-
Labels:
-
Template:customfield_10700 146020
-
Epic Link:
-
Story Points:2
-
Sprint:Windows 2016-09-07
While testing MODULES-3399, I determined that the PowerShell module does not respect timeouts.
|
exec {'sleep command with timeout - should fail':
|
command => 'Write-Host "Going to sleep now..."; Start-Sleep 30',
|
timeout => 2,
|
provider => powershell,
|
}
|
|
exec {'sleep command with timeout retries - should fail':
|
command => 'Write-Host "Going to sleep now..."; Start-Sleep 30',
|
timeout => 2,
|
tries => 2,
|
try_sleep => 1,
|
provider => powershell,
|
}
|
|
Running the prerelease for the latest version of 2.x - After the long sleep time:
Notice: /Stage[main]/Exec[sleep command with timeout - should fail]/returns: executed successfully
|
Notice: /Stage[main]/Exec[sleep command with timeout retries - should fail]/returns: executed successfully
|
When switching back to 1.x, it works properly:
Error: Command exceeded timeout
|
Error: /Stage[main]/Exec[sleep command with timeout - should fail]/returns: change from notrun to 0 failed: Command exceeded timeout
|
Error: Command exceeded timeout
|
Error: /Stage[main]/Exec[sleep command with timeout retries - should fail]/returns: change from notrun to 0 failed: Command exceeded timeout
|
- relates to
-
MODULES-4138 PowerShell module 2.x does not respect environment parameter - doesn't receive environment variables passed through
-
- Resolved
-
-
MODULES-3399 PowerShell module 2.x - capturing exit codes from scripts fail
-
- Resolved
-
- links to