Grease some more tests hitting RetryDecorator
That's "grease" in the sense of "lubricate", or "make faster". Not in the sense of "kill with an M3 submachine gun". Similar optimizations to [1] in libvirt/test_guest (RetryDecorator in detach_device_with_retry) and disk/mount/test_api (RetryDecorator in Mount.map_dev). [1] I60d11fc9a9e8569b1663c7319a5c25b921c5de1a Change-Id: Ic7ad60ce89c93c0f03c040e244f8191c963c08f3
This commit is contained in:
parent
05f88f6e3b
commit
63fae18528
|
@ -28,6 +28,8 @@ AUTOMAP_PARTITION = "/dev/nullp77"
|
|||
MAP_PARTITION = "/dev/mapper/nullp77"
|
||||
|
||||
|
||||
# Make RetryDecorator not actually sleep on retries
|
||||
@mock.patch('oslo_service.loopingcall._ThreadingEvent.wait', new=mock.Mock())
|
||||
class MountTestCase(test.NoDBTestCase):
|
||||
def _test_map_dev(self, partition):
|
||||
mount = api.Mount(mock.sentinel.image, mock.sentinel.mount_dir)
|
||||
|
|
|
@ -34,6 +34,8 @@ if sys.version_info > (3,):
|
|||
long = int
|
||||
|
||||
|
||||
# Make RetryDecorator not actually sleep on retries
|
||||
@mock.patch('oslo_service.loopingcall._ThreadingEvent.wait', new=mock.Mock())
|
||||
class GuestTestCase(test.NoDBTestCase):
|
||||
|
||||
def setUp(self):
|
||||
|
|
Loading…
Reference in New Issue