Merge "Tests: Reduce time waiting in Hitachi HBSD tests"

This commit is contained in:
Zuul 2022-03-19 02:54:36 +00:00 committed by Gerrit Code Review
commit d2b9831d15
1 changed files with 2 additions and 0 deletions

View File

@ -661,9 +661,11 @@ class HBSDRESTFCDriverTest(test.TestCase):
@reduce_retrying_time
@mock.patch.object(requests.Session, "request")
def test_create_volume_timeout(self, request):
self.configuration.hitachi_rest_timeout = 2
request.return_value = FakeResponse(
500, ERROR_RESULT,
headers={'Content-Type': 'json'})
self.assertRaises(exception.VolumeDriverException,
self.driver.create_volume,
fake_volume.fake_volume_obj(self.ctxt))