From c6f0f79ea561ab87ae0c91c6e55c7ace26b8769a Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Mon, 23 Mar 2020 12:06:04 +0100 Subject: [PATCH] radosgw: Add retry for object storage test When testing with TLS there is a chance the deployment will appear done and idle prior to ceph-radosgw and Keystone have updated the service catalog. Retry the test in this circumstance. --- zaza/openstack/charm_tests/ceph/tests.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zaza/openstack/charm_tests/ceph/tests.py b/zaza/openstack/charm_tests/ceph/tests.py index a607a5f..ef3b59b 100644 --- a/zaza/openstack/charm_tests/ceph/tests.py +++ b/zaza/openstack/charm_tests/ceph/tests.py @@ -592,6 +592,13 @@ class CephRGWTest(test_utils.OpenStackBaseTest): target_status='running' ) + # When testing with TLS there is a chance the deployment will appear done + # and idle prior to ceph-radosgw and Keystone have updated the service + # catalog. Retry the test in this circumstance. + @tenacity.retry(wait=tenacity.wait_exponential(multiplier=10, max=300), + reraise=True, stop=tenacity.stop_after_attempt(10), + retry=tenacity.retry_if_exception_type( + ConnectionRefusedError)) def test_object_storage(self): """Verify object storage API.