commit 24b11ded7f6ff12f9484aecdb8d30498bf1b9025
Author: Terry Wilson <email address hidden>
Date: Thu Jan 22 13:52:43 2015 -0600
monkey patch stdlib before importing other modules
Some oslo libraries assume that stdlib is already patched when
they are imported (e.g. oslo_concurrency.processutils tests the
'time' module for monkey_patching to detect which 'subprocess'
module to import.
This can cause issues when things like test frameworks import
modules that monkey_patch, as the order imports are made can break
this kind of check. It is always good to monkey patch as soon as
possible, hence trying to do the patching in neutron/__init__.py.
This is an alternative to https://review.openstack.org/#/c/153225/
which just patches neutron/tests/__init__.py. Unfortunately, just
monkey_patching in tests/__init__.py didn't fix all of the issues
I ran into. For example, tempest tests were failing with timeouts.
Reviewed: https:/ /review. openstack. org/153699 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=24b11ded7f6 ff12f9484aecdb8 d30498bf1b9025
Committed: https:/
Submitter: Jenkins
Branch: master
commit 24b11ded7f6ff12 f9484aecdb8d304 98bf1b9025
Author: Terry Wilson <email address hidden>
Date: Thu Jan 22 13:52:43 2015 -0600
monkey patch stdlib before importing other modules
Some oslo libraries assume that stdlib is already patched when y.processutils tests the
they are imported (e.g. oslo_concurrenc
'time' module for monkey_patching to detect which 'subprocess'
module to import.
This can cause issues when things like test frameworks import __init_ _.py.
modules that monkey_patch, as the order imports are made can break
this kind of check. It is always good to monkey patch as soon as
possible, hence trying to do the patching in neutron/
This is an alternative to https:/ /review. openstack. org/#/c/ 153225/ tests/_ _init__ .py. Unfortunately, just
which just patches neutron/
monkey_patching in tests/__init__.py didn't fix all of the issues
I ran into. For example, tempest tests were failing with timeouts.
Closes-bug: #1418541 b6d61aab2f7334f 498b8d99858
Change-Id: I7f2115a99acae5