diff --git a/heat_integrationtests/scenario/test_autoscaling_lb.py b/heat_integrationtests/scenario/test_autoscaling_lb.py index 11a5088c2e..b0b856d5f5 100644 --- a/heat_integrationtests/scenario/test_autoscaling_lb.py +++ b/heat_integrationtests/scenario/test_autoscaling_lb.py @@ -37,8 +37,12 @@ class AutoscalingLoadBalancerTest(scenario_base.ScenarioTestsBase): resp = set() for count in range(retries): time.sleep(1) - r = requests.get(url, verify=self.verify_cert) - # skip unsuccessfull requests + try: + r = requests.get(url, verify=self.verify_cert) + 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) self.assertEqual(expected_num, len(resp))