Dodging the race condition with a sleep was fine, but we slept
for a whole second which was longer than this test takes to run!
I've scaled the sleep down to 250 miliseconds and increased the tries.
Even this is probably excessively long but now the test is fast agin.