Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
2
-
Windows 2016-09-07
Description
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
|
Attachments
Issue Links
- 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