Retry tests up to 3 times, if a deadlock is detected