]> review.fuel-infra Code Review - openstack-build/heat-build.git/commit
Global disable scheduler _sleep instead of mocking.
authorSteve Baker <sbaker@redhat.com>
Thu, 11 Jul 2013 04:08:54 +0000 (16:08 +1200)
committerSteve Baker <sbaker@redhat.com>
Thu, 11 Jul 2013 04:08:54 +0000 (16:08 +1200)
commitd6b9e3e6340ee6f426c6e5c63bd459f75e890b52
treed4a47f7a4d6d621b944d96b7bdebfd832ed58940
parent64edc76c102584281c9aeff1861f0c559ca0a69b
Global disable scheduler _sleep instead of mocking.

It is becoming increasingly difficult to predict when
a call to TaskRunner._sleep needs to be scripted, and is probably an
implementation detail which shouldn't be exposed to unit tests anyway.

This change defines a global which prevents sleeping in calls to _sleep
and toggles that global in HeatTestCase setUp.

Change-Id: I98dc88c9d120c409d5720895bb4fb625a1f12991
12 files changed:
heat/engine/scheduler.py
heat/tests/common.py
heat/tests/test_autoscaling.py
heat/tests/test_instance.py
heat/tests/test_instance_group.py
heat/tests/test_loadbalancer.py
heat/tests/test_metadata_refresh.py
heat/tests/test_parser.py
heat/tests/test_quantum.py
heat/tests/test_volume.py
heat/tests/test_vpc.py
heat/tests/test_waitcondition.py