As of liberty.2, the Manila unit tests are taking ~60 seconds to run
on my system. A dozen or so of the tests consistently take an integral
number of seconds to run (i.e. 1, 2, 3 or 4 seconds), indicating the
presence of a time.sleep() call in the code that hasn't been mocked.
By mocking time.sleep() and time.time() in just a few files, the time
needed to run the unit tests falls by a third to ~40 seconds (!).
Reviewed: https:/ /review. openstack. org/206652 /git.openstack. org/cgit/ openstack/ manila/ commit/ ?id=0a39557c74d 66218d06d63d40f d453a7382a775c
Committed: https:/
Submitter: Jenkins
Branch: master
commit 0a39557c74d6621 8d06d63d40fd453 a7382a775c
Author: Clinton Knight <email address hidden>
Date: Mon Jul 27 13:06:57 2015 -0400
Fix slow unit tests
As of liberty.2, the Manila unit tests are taking ~60 seconds to run
on my system. A dozen or so of the tests consistently take an integral
number of seconds to run (i.e. 1, 2, 3 or 4 seconds), indicating the
presence of a time.sleep() call in the code that hasn't been mocked.
By mocking time.sleep() and time.time() in just a few files, the time
needed to run the unit tests falls by a third to ~40 seconds (!).
Change-Id: I66a6d864823b10 a4193eadf65a1c5 d3028f2afa7
Closes-bug: 1478644