Removed Thread.Sleep() from time dependent test in favour of a wait