Merge "Fixes eventlet monotonic clock issue"
This commit is contained in:
commit
7cc9d95e29
|
@ -14,7 +14,9 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import eventlet.hubs as hubs
|
||||
import mock
|
||||
import monotonic
|
||||
from os_win import utilsfactory
|
||||
|
||||
from compute_hyperv.tests import test
|
||||
|
@ -39,3 +41,11 @@ class HyperVBaseTestCase(test.NoDBTestCase):
|
|||
'.'.join([class_type.__module__, class_type.__name__]),
|
||||
mocked_class)
|
||||
patcher.start()
|
||||
|
||||
|
||||
class MonotonicTestCase(test.NoDBTestCase):
|
||||
def test_monotonic(self):
|
||||
import nova # noqa
|
||||
|
||||
hub = hubs.get_hub()
|
||||
self.assertEqual(monotonic.monotonic, hub.clock)
|
||||
|
|
|
@ -13,3 +13,14 @@
|
|||
# under the License.
|
||||
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
|
||||
import os
|
||||
|
||||
os.environ['EVENTLET_NO_GREENDNS'] = 'yes'
|
||||
|
||||
# NOTE(rpodolyaka): import oslo_service first, so that it makes eventlet hub
|
||||
# use a monotonic clock to avoid issues with drifts of system time (see
|
||||
# LP 1510234 for details)
|
||||
import oslo_service # noqa
|
||||
|
||||
import eventlet # noqa
|
||||
|
|
Loading…
Reference in New Issue