From 296119633308f22b4e06718e8293a8c2f2f5b19b Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Fri, 29 Nov 2019 16:32:07 +0100 Subject: [PATCH] neutron: Retry operation after change of config There is a race between `neutron-api` charm readiness and actual API readiness. Fixes #138 --- zaza/openstack/charm_tests/policyd/tests.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zaza/openstack/charm_tests/policyd/tests.py b/zaza/openstack/charm_tests/policyd/tests.py index 0c7ad3e..532495f 100644 --- a/zaza/openstack/charm_tests/policyd/tests.py +++ b/zaza/openstack/charm_tests/policyd/tests.py @@ -522,6 +522,12 @@ class NeutronApiTests(BasePolicydSpecialization): super(NeutronApiTests, cls).setUpClass(application_name="neutron-api") cls.application_name = "neutron-api" + # NOTE(fnordahl): There is a race between `neutron-api` signalling unit is + # ready and the service actually being ready to serve requests. The test + # will fail intermittently unless we gracefully accept this. + # Issue: openstack-charmers/zaza-openstack-tests#138 + @tenacity.retry(wait=tenacity.wait_fixed(1), + reraise=True, stop=tenacity.stop_after_delay(8)) def get_client_and_attempt_operation(self, ip): """Attempt to list the networks as a policyd override.