Merge "Mock time.sleep for VMAXRestTest.test_remove_vol_from_sg_failed"

This commit is contained in:
Jenkins 2017-06-30 05:21:53 +00:00 committed by Gerrit Code Review
commit af77fe9dbc

@ -17,6 +17,7 @@ import ast
from copy import deepcopy from copy import deepcopy
import datetime import datetime
import tempfile import tempfile
import time
from xml.dom import minidom from xml.dom import minidom
import mock import mock
@ -1219,7 +1220,8 @@ class VMAXRestTest(test.TestCase):
self.rest.wait_for_job.assert_called_with( self.rest.wait_for_job.assert_called_with(
operation, status_code, message, self.data.extra_specs) operation, status_code, message, self.data.extra_specs)
def test_remove_vol_from_sg_failed(self): @mock.patch.object(time, 'sleep')
def test_remove_vol_from_sg_failed(self, mock_sleep):
device_id = [self.data.volume_details[0]['volumeId']] device_id = [self.data.volume_details[0]['volumeId']]
self.assertRaises( self.assertRaises(
exception.VolumeBackendAPIException, exception.VolumeBackendAPIException,