Introduce some stress tests. (#106)

* Retry first connection to redis in db_connect.

* Declare usleep.

* Formatting.

* Introduce some stress tests.
This commit is contained in:
Robert Nishihara
2016-12-09 17:49:31 -08:00
committed by Philipp Moritz
parent c740b165f4
commit 6441571d31
3 changed files with 113 additions and 0 deletions
+3
View File
@@ -66,6 +66,9 @@ def cleanup():
print("Ray did not shut down properly.")
all_processes = []
def all_processes_alive():
return all([p.poll() is None for p in all_processes])
def start_redis(num_retries=20, cleanup=True):
"""Start a Redis server.