diff options
author | Zuul <zuul@review.opendev.org> | 2020-06-03 11:46:52 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2020-06-03 11:46:52 +0000 |
commit | e7f54d3ee8a028c748ea80055dba62d3ca91e830 (patch) | |
tree | 7273b9982499f9e9ee9779165e0d8a3402149486 | |
parent | 69418be09575d6b5b6169ba2801883884f299dc6 (diff) | |
parent | 9168889dbaa2db9ec8a72dea72c2bc1e13f60e6a (diff) | |
download | oslo-concurrency-e7f54d3ee8a028c748ea80055dba62d3ca91e830.tar.gz |
Merge "Monkey patch original current_thread _active"4.1.0
-rw-r--r-- | oslo_concurrency/tests/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/oslo_concurrency/tests/__init__.py b/oslo_concurrency/tests/__init__.py index bd455c4..73122fb 100644 --- a/oslo_concurrency/tests/__init__.py +++ b/oslo_concurrency/tests/__init__.py @@ -17,3 +17,9 @@ import os if os.environ.get('TEST_EVENTLET'): import eventlet eventlet.monkey_patch() + # Monkey patch the original current_thread to use the up-to-date _active + # global variable. See https://bugs.launchpad.net/bugs/1863021 and + # https://github.com/eventlet/eventlet/issues/592 + import __original_module_threading as orig_threading # noqa + import threading # noqa + orig_threading.current_thread.__globals__['_active'] = threading._active |