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 1515# under the License.
1616
1717import collections
18- import fixtures
1918
2019import mock
20+ from oslo_service import fixture as oslo_svc_fixture
2121from oslo_utils import units
2222from oslo_utils import uuidutils
2323from oslo_vmware import exceptions as vexc
@@ -1024,6 +1024,8 @@ def test_create_vm_invalid_guestid(self, mock_log_warn):
10241024 """Ensure we warn when create_vm() fails after we passed an
10251025 unrecognised guestId
10261026 """
1027+ # avoid real sleeps during test due to te retry decorator on create_vm
1028+ self .useFixture (oslo_svc_fixture .SleepFixture ())
10271029
10281030 found = [False ]
10291031
@@ -1042,8 +1044,7 @@ def fake_log_warn(msg, values):
10421044 vm_util .ExtraSpecs (),
10431045 os_type = 'invalid_os_type' )
10441046
1045- # Because of retries timeout will be raised
1046- self .assertRaises (fixtures .TimeoutException ,
1047+ self .assertRaises (vexc .VMwareDriverException ,
10471048 vm_util .create_vm , session , self ._instance ,
10481049 'folder' , config_spec , 'res-pool' )
10491050 self .assertTrue (found [0 ])
You can’t perform that action at this time.
0 commit comments