Merge "Ignore connection error when testing load balancer"

This commit is contained in:
Jenkins 2016-02-18 14:17:33 +00:00 committed by Gerrit Code Review
commit 834ac4a041
1 changed files with 5 additions and 1 deletions

View File

@ -38,7 +38,11 @@ class AutoscalingLoadBalancerTest(scenario_base.ScenarioTestsBase):
resp = set()
for count in range(retries):
time.sleep(1)
r = requests.get(url)
try:
r = requests.get(url)
except requests.exceptions.ConnectionError:
# The LB may not be up yet, let's retry
continue
# skip unsuccessful requests
if r.status_code == 200:
resp.add(r.text)