File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
nova/tests/unit/virt/vmwareapi Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 15
15
# under the License.
16
16
17
17
import collections
18
- import fixtures
19
18
20
19
import mock
20
+ from oslo_service import fixture as oslo_svc_fixture
21
21
from oslo_utils import units
22
22
from oslo_utils import uuidutils
23
23
from oslo_vmware import exceptions as vexc
@@ -1024,6 +1024,8 @@ def test_create_vm_invalid_guestid(self, mock_log_warn):
1024
1024
"""Ensure we warn when create_vm() fails after we passed an
1025
1025
unrecognised guestId
1026
1026
"""
1027
+ # avoid real sleeps during test due to te retry decorator on create_vm
1028
+ self .useFixture (oslo_svc_fixture .SleepFixture ())
1027
1029
1028
1030
found = [False ]
1029
1031
@@ -1042,8 +1044,7 @@ def fake_log_warn(msg, values):
1042
1044
vm_util .ExtraSpecs (),
1043
1045
os_type = 'invalid_os_type' )
1044
1046
1045
- # Because of retries timeout will be raised
1046
- self .assertRaises (fixtures .TimeoutException ,
1047
+ self .assertRaises (vexc .VMwareDriverException ,
1047
1048
vm_util .create_vm , session , self ._instance ,
1048
1049
'folder' , config_spec , 'res-pool' )
1049
1050
self .assertTrue (found [0 ])
You can’t perform that action at this time.
0 commit comments