Fix failing test with a wait.