Allow us to retry the Manila client connection
It is possible that Manila looks ready before it is, so we should retry a bit to ensure that the APi service is really down before giving up
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user