Ignore connection error when testing load balancer
In the integration test with Neutron Load Balancer, we sometimes fail to connect to the Load Balancer when testing that the stack deployed successfully. Let's ignore those errors so that we retry for a bit in case it takes some time to be deployed. Change-Id: Ic97bd83fe56dc52fb49848d93e40cb57d1550a1f Closes-Bug: #1545587
This commit is contained in:
parent
7642d1dba0
commit
df73c1c798
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user