golang-awaitility provides a simple mechanism to poll for conditions with a general timeout.
By chatting or signing in you agree to the Terms and chat-message logging (revocable in History).