diff --git a/nova/tests/unit/compute/test_compute_mgr.py b/nova/tests/unit/compute/test_compute_mgr.py index 36be23c8fb05..dafd8aab431e 100644 --- a/nova/tests/unit/compute/test_compute_mgr.py +++ b/nova/tests/unit/compute/test_compute_mgr.py @@ -6390,7 +6390,7 @@ class ComputeManagerBuildInstanceTestCase(test.NoDBTestCase): self.context, mock.sentinel.instance, requested_networks=requested_networks) - @mock.patch('oslo_service.loopingcall._ThreadingEvent.wait', + @mock.patch('oslo_service.loopingcall.LoopingCallBase._sleep', new=mock.Mock()) @mock.patch('nova.compute.manager.ComputeManager._deallocate_network') @mock.patch('nova.compute.manager.LOG.warning') diff --git a/nova/tests/unit/virt/disk/mount/test_api.py b/nova/tests/unit/virt/disk/mount/test_api.py index b92f43abf47b..a80c7f153149 100644 --- a/nova/tests/unit/virt/disk/mount/test_api.py +++ b/nova/tests/unit/virt/disk/mount/test_api.py @@ -29,7 +29,7 @@ MAP_PARTITION = "/dev/mapper/nullp77" # Make RetryDecorator not actually sleep on retries -@mock.patch('oslo_service.loopingcall._ThreadingEvent.wait', new=mock.Mock()) +@mock.patch('oslo_service.loopingcall.LoopingCallBase._sleep', new=mock.Mock()) class MountTestCase(test.NoDBTestCase): def _test_map_dev(self, partition): mount = api.Mount(mock.sentinel.image, mock.sentinel.mount_dir) diff --git a/nova/tests/unit/virt/libvirt/test_guest.py b/nova/tests/unit/virt/libvirt/test_guest.py index 04c2b812fdde..4943b2dfa79d 100644 --- a/nova/tests/unit/virt/libvirt/test_guest.py +++ b/nova/tests/unit/virt/libvirt/test_guest.py @@ -35,7 +35,7 @@ if sys.version_info > (3,): # Make RetryDecorator not actually sleep on retries -@mock.patch('oslo_service.loopingcall._ThreadingEvent.wait', new=mock.Mock()) +@mock.patch('oslo_service.loopingcall.LoopingCallBase._sleep', new=mock.Mock()) class GuestTestCase(test.NoDBTestCase): def setUp(self):