commit | 0e53b61f853dd055e6bf4df82068609bb5575d78 | [log] [tgz] |
---|---|---|
author | Jordan Pittier <jordan.pittier@scality.com> | Thu Mar 03 14:23:17 2016 +0100 |
committer | Jordan Pittier <jordan.pittier@scality.com> | Thu Mar 03 14:33:45 2016 +0100 |
tree | eca2efb58f1c45dc1bea7143d94dffe9ce5ed0b3 | |
parent | 9984801b851bb51ef327dcadc55b31c9620c7ae8 [diff] |
Unit tests: mock some time.sleep and time.time Similar to what Cinder did here [1], this patch mocks time.sleep to make tests run faster. Some code actually measure the wall clock to wait for a specific duration before raising a TimeoutError, so we also need to mock time.time. This removes ~5sec in unit test and also removes some busy waiting. [1] https://review.openstack.org/#/c/285658/ Change-Id: I69ba35eff591a5df28049273f3aba15c31f52d00