]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Trim 12s from disco unit tests
authorTom Barron <tpb@dyncloud.net>
Sat, 27 Feb 2016 10:20:18 +0000 (05:20 -0500)
committerTom Barron <tpb@dyncloud.net>
Sat, 27 Feb 2016 16:14:53 +0000 (11:14 -0500)
commitc2166876d85b17872c6fe32916c6d0d1dc974847
tree313498bd8cc7fdd0d3e14a73ccf001cf89aa67f0
parentd3fd2828f6970ab5b2c3cb5014a0ef73eb64feee
Trim 12s from disco unit tests

The unit tests under cinder/tests/unit/volume/drivers/disco
contain three "timeout" tests, each of which runs more than 4s
while waiting for timeouts to expire.

This commit mocks time.time() in those tests using a utility
method that ensures an immediate timeout.

Change-Id: I8453e0231d7563d70732816bd3931140bcc01f4f
cinder/tests/unit/utils.py
cinder/tests/unit/volume/drivers/disco/test_create_cloned_volume.py
cinder/tests/unit/volume/drivers/disco/test_create_snapshot.py
cinder/tests/unit/volume/drivers/disco/test_create_volume_from_snapshot.py