diff options
author | Thomas Herve <therve@redhat.com> | 2016-02-18 13:15:37 +0100 |
---|---|---|
committer | Sergey Kraynev <skraynev@mirantis.com> | 2016-04-04 03:14:53 -0400 |
commit | 3bdcd6e2ce5481d6d2ddb77680586273d4e933e0 (patch) | |
tree | c8c20fa98601ccb74b95c8b82447909a83ee5971 | |
parent | 94525650188e241028db85f0cd56abcb24e6a3e9 (diff) | |
download | heat-3bdcd6e2ce5481d6d2ddb77680586273d4e933e0.tar.gz |
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
(cherry picked from commit df73c1c79852f697208bed6dc59c6b790aeb8eb8)
-rw-r--r-- | heat_integrationtests/scenario/test_autoscaling_lb.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/heat_integrationtests/scenario/test_autoscaling_lb.py b/heat_integrationtests/scenario/test_autoscaling_lb.py index 11a5088c2..b0b856d5f 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)) |