title: Unexpected behaviour with Groovy while loop execution in Jenkins pipeline
body: <p>I created simple Jenkins pipeline job with only having 'Pipeline script' in it -</p>
  
  <pre><code>node {
      stage('test') {
          def count = 1
         while(count &lt;= 5) {
             echo "Count is $count"
          echo "Sleeping for 5 seconds..."
          sleep(5000)
          count++
         }
      }
  }
  </code></pre>
  
  <p>When ran the job, I get following result -</p>
  
  <pre><code>[Pipeline] Start of Pipeline
  [Pipeline] node
  Running on Jenkins in C:\Program Files (x86)\Jenkins\workspace\TestFile
  [Pipeline] {
  [Pipeline] stage
  [Pipeline] { (test)
  [Pipeline] echo
  Count is 1
  [Pipeline] echo
  Sleepig for 5 seconds...
  [Pipeline] sleep
  Sleeping for 1 hr 23 min
  </code></pre>
  
  <p>After first while block execution, it sleeps saying <code>Sleeping for 1 hr 23 min</code>. How does this abrupt sleep come?</p>
  
  <p>However same groovy script runs fine outside of Jenkins.</p>