]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
mock time.sleep in Broadcom unit test
authorTom Barron <tpb@dyncloud.net>
Wed, 3 Feb 2016 22:14:23 +0000 (17:14 -0500)
committerTom Barron <tpb@dyncloud.net>
Wed, 3 Feb 2016 22:25:27 +0000 (17:25 -0500)
commit4de6d18195ebcb3ead9a2cb03adeef36c0ef3a7b
tree92609039920cba5f2de90dccf9841da23bd5d612
parent4cfed22bf8494fe54df49f6c11a0ee3f94625864
mock time.sleep in Broadcom unit test

TestBrcdHttpFCZoneClient.test_post_zone_data() invokes
BrcdHTTPFCZoneClient.post_zone_data(), which in turn
has a loop around its connect() method inside which there
is a sleep().  Without time.sleep() mocked out, the test
runs 7s on my laptop.

This change mocks out time.sleep() in the test so that
it now runs in .6s.

Change-Id: Ib4c3a12b048a68d2c2db722c089eb04dd7d8c8ef
cinder/tests/unit/zonemanager/test_brcd_http_fc_zone_client.py