tests: Reduce test time on OSX

Locally, this reduced the test time from 240s to 0.16s.

Change-Id: I5a4786b6782c06f8e6bd9fab5d4dae683a970242
This commit is contained in:
Tim Burke
2025-05-21 18:54:52 -07:00
parent b735b3d034
commit 877c936e2f

View File

@@ -1547,7 +1547,9 @@ class TestObjectReplicator(unittest.TestCase):
self.assertTrue(os.path.exists(part_path))
self.assertEqual([mock.call(part_path)], mockrmtree.call_args_list)
def test_delete_policy_override_params(self):
@mock.patch('swift.common.bufferedhttp.BufferedHTTPConnection.connect',
side_effect=OSError(errno.ECONNREFUSED, 'ECONNREFUSED'))
def test_delete_policy_override_params(self, _mock_connect):
df0 = self.df_mgr.get_diskfile('sda', '99', 'a', 'c', 'o',
policy=POLICIES.legacy)
df1 = self.df_mgr.get_diskfile('sda', '99', 'a', 'c', 'o',