Merge pull request #152 from openstack-charmers/bug/slow-manila-api

Allow us to retry the Manila client connection
This commit is contained in:
Alex Kavanagh
2020-01-13 15:13:06 +00:00
committed by GitHub

View File

@@ -16,6 +16,7 @@
"""Encapsulate Manila testing."""
from tenacity import Retrying, stop_after_attempt, wait_exponential
from manilaclient import client as manilaclient
@@ -38,4 +39,7 @@ class ManilaTests(test_utils.OpenStackBaseTest):
def test_manila_api(self):
"""Test that the Manila API is working."""
# now just try a list the shares
self.manila_client.shares.list()
for attempt in Retrying(
stop=stop_after_attempt(3),
wait=wait_exponential(multiplier=1, min=2, max=10)):
self.manila_client.shares.list()