title: Groovy while loop not executed correctly
body: <p>I've following simple while loop code in groovy -</p>
  
  <pre><code>def count = 1
  while(count &lt;= 5) {
      println "$count"
      sleep(5000)
      println "Sleeping for 5 seconds"
      count++
  }
  </code></pre>
  
  <p>Which indicates that loop is executed only twice still second time <code>Sleeping for 5 seconds</code> is not run. Actually with this code, while block is expected to be executed 5 times. Can someone help to understand why such a weird behaviour?</p>
  
  <p>When this code is run, output is following - </p>
  
  <pre><code>1
  Sleeping for 5 seconds
  2
  </code></pre>