Mock tenacity in gluster driver unit tests

We're going into a long wait loop when the retrying
logic kicks in in some unit tests:

manila.tests.share.drivers.glusterfs.test_common.GlusterManagerTestCase.test_set_vol_option_error_1                                                        511.046
manila.tests.share.drivers.glusterfs.test_common.GlusterManagerTestCase.test_set_vol_option_error_2                                                        511.040

TrivialFix

Change-Id: I9eafbfe0cb806d05525a3b17c43d92f0f5fbfac1
This commit is contained in:
Goutham Pacha Ravi 2022-02-14 22:27:42 -08:00
parent 7f2b25332a
commit 9d868a2432

View File

@ -680,6 +680,7 @@ class GlusterManagerTestCase(test.TestCase):
'volume', args[0], 'testvol', 'an_option', *args[1:],
error_policy=mock.ANY)
@mock.patch('tenacity.nap.sleep', mock.Mock())
@ddt.data({}, {'ignore_failure': False})
def test_set_vol_option_error(self, kwargs):
fake_obj = mock.Mock(