Merge "eventlet workaround to avoid import cycle issue"

This commit is contained in:
Zuul 2018-02-05 19:56:42 +00:00 committed by Gerrit Code Review
commit 083146419f
4 changed files with 18 additions and 5 deletions

View File

@ -1,3 +1,9 @@
# NOTE(ekcs): monkey_patch upfront to ensure all imports get patched modules
import eventlet
# NOTE(ekcs): get_hub() before monkey_patch() to workaround issue with
# import cycles in eventlet < 0.22.0;
# Based on the worked-around in eventlet with patch
# https://github.com/eventlet/eventlet/commit/b756447bab51046dfc6f1e0e299cc997ab343701
# For details please check https://bugs.launchpad.net/congress/+bug/1746136
eventlet.hubs.get_hub()
eventlet.monkey_patch()

View File

@ -1,3 +1,9 @@
# NOTE(ekcs): monkey_patch upfront to ensure all imports get patched modules
import eventlet
# NOTE(ekcs): get_hub() before monkey_patch() to workaround issue with
# import cycles in eventlet < 0.22.0;
# Based on the worked-around in eventlet with patch
# https://github.com/eventlet/eventlet/commit/b756447bab51046dfc6f1e0e299cc997ab343701
# For details please check https://bugs.launchpad.net/congress/+bug/1746136
eventlet.hubs.get_hub()
eventlet.monkey_patch()

View File

@ -1,3 +1,9 @@
# NOTE(boden): patch upfront to ensure all imports get patched modules
import eventlet
# NOTE(ekcs): get_hub() before monkey_patch() to workaround issue with
# import cycles in eventlet < 0.22.0;
# Based on the worked-around in eventlet with patch
# https://github.com/eventlet/eventlet/commit/b756447bab51046dfc6f1e0e299cc997ab343701
# For details please check https://bugs.launchpad.net/congress/+bug/1746136
eventlet.hubs.get_hub()
eventlet.monkey_patch()

View File

@ -31,7 +31,6 @@ import time
from oslo_log import log as logging
import requests
import six
import tenacity
from congress.db import api as db
@ -71,10 +70,6 @@ class TestCongressHAHT(base.SqlTestCase):
return x
def setUp(self):
# FIXME(ekcs): fix test and unskip
if six.PY2:
self.skipTest("Temporarily skip under python 2 while "
"failure is being resolved.")
super(TestCongressHAHT, self).setUp()
assert sys.executable is not None,\
'test cannot proceed when sys.executable is None'