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
diff --git a/scenario/test_autoscaling_lb.py b/scenario/test_autoscaling_lb.py
index 080f17f..e3de091 100644
--- a/scenario/test_autoscaling_lb.py
+++ b/scenario/test_autoscaling_lb.py
@@ -38,7 +38,11 @@
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)