Adding some safeguards so tests do not fail because the process was not ready on time.