Make Daphne process tests try harder.

This commit is contained in:
Andrew Godwin 2018-02-01 21:22:15 -08:00
parent 0572b1dbcd
commit eb7468059d

View File

@ -59,7 +59,8 @@ class DaphneTestingInstance:
# Optionally enable X-Forwarded-For support. # Optionally enable X-Forwarded-For support.
if self.xff: if self.xff:
daphne_args += ["--proxy-headers"] daphne_args += ["--proxy-headers"]
# Start up process and make sure it begins listening. # Start up process and make sure it begins listening. Try this 3 times.
for _ in range(3):
self.process = subprocess.Popen(daphne_args + ["daphne.test_application:TestApplication"]) self.process = subprocess.Popen(daphne_args + ["daphne.test_application:TestApplication"])
for _ in range(30): for _ in range(30):
time.sleep(0.1) time.sleep(0.1)