title: Jenkins Pipeline sleep(10) prevents function from being completed
body: <p>I have found a strange issue with Groovy code in Jenkinsfile:</p>
  
  <pre><code>@NonCPS
  def test() {
    println "Start"
    sleep(10)
    println "Stop"
  }
  </code></pre>
  
  <p>Thing is, that after sleeping for 10s code never gets to <code>println "Stop"</code>.<br>
  It just seems, that sleep returns after 10 seconds and runs next pipeline steps.   </p>
  
  <p>Output is just:  </p>
  
  <pre><code>[Pipieline] echo
  Start
  [Pipeline] sleep
  Sleeping for 10 sec
  [Pipeline] }
   ... next pipeline steps
  </code></pre>
  
  <p>Did anyone had same problem?</p>