Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-3709

PowerShell module 2.x - Does not Respect Timeout

    XMLWordPrintable

Details

    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

          Activity

            People

              erick Erick Banks
              rob Rob Reynolds
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support