From 9d868a2432bcee212c9f6f4b54b04255520ed172 Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Mon, 14 Feb 2022 22:27:42 -0800 Subject: [PATCH] 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 --- manila/tests/share/drivers/glusterfs/test_common.py | 1 + 1 file changed, 1 insertion(+) diff --git a/manila/tests/share/drivers/glusterfs/test_common.py b/manila/tests/share/drivers/glusterfs/test_common.py index 14a0bf8e2b..2b0c3328b7 100644 --- a/manila/tests/share/drivers/glusterfs/test_common.py +++ b/manila/tests/share/drivers/glusterfs/test_common.py @@ -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(