]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix laggard cisco FC zone client unit tests
authorTom Barron <tpb@dyncloud.net>
Thu, 21 Jan 2016 03:44:48 +0000 (22:44 -0500)
committerTom Barron <tpb@dyncloud.net>
Fri, 22 Jan 2016 11:45:40 +0000 (06:45 -0500)
commit54ea31a80be047a7145553203ef8231f8c36df5d
treec4e774659fb966e9c52f021b43f712adc9eb8f9e
parent201f7d73828054144812b8f25d642e219bf09f45
Fix laggard cisco FC zone client unit tests

The test_cisco_fc_zone_client_cli.py unit module tests methods
decorated by utils.retry, which does retries with exponential
backoffs, without mocking out time.sleep().  One test in this
suite takes about 10% of the total time to run all cinder unit
tests.

This commit mocks time.sleep() in two critical tests in this
module, yielding a 30x speedup in run-time for the module.

Closes-Bug: #1536457

Change-Id: I3a686b760e2049a1f0ae4f8ee5ccbb4fa974aa1f
cinder/tests/unit/zonemanager/test_cisco_fc_zone_client_cli.py