This was failing on our CI server sometimes possibly under heavy build load
Added sleep() and interrupt() for better thread co-ordination due to the test being unreliable in different environments