wait_for_status when waiting for test server to boot up

This commit is contained in:
Honza Kral
2013-06-07 18:25:57 +02:00
parent 0eafdab2e8
commit c064bf7764
+3 -3
View File
@@ -58,11 +58,11 @@ def setup():
response = None
time.sleep(.1)
try:
response = requests.get('http://localhost:%(port)s/_cluster/health' % args)
response = requests.get('http://localhost:%(port)s/_cluster/health?wait_for_status=green' % args)
except requests.ConnectionError:
pass
continue
if response and response.json()['status'] == 'green':
if response.status_code == 200:
break
else: