Bug 1119172
Summary: | pthreading.monkey_patch is too late when done in the vdsm tests | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Yaniv Bronhaim <ybronhei> |
Component: | python-pthreading | Assignee: | Yaniv Bronhaim <ybronhei> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Jiri Belka <jbelka> |
Severity: | unspecified | Docs Contact: | Ruediger Landmann <rlandman> |
Priority: | unspecified | ||
Version: | 3.6.0 | CC: | bazulay, danken, gklein, nsoffer, oourfali, pstehlik, srevivo, ybronhei |
Target Milestone: | ovirt-3.6.0-rc | Keywords: | CodeChange |
Target Release: | 3.6.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-04-20 01:28:06 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Yaniv Bronhaim
2014-07-14 08:21:20 UTC
Monkey patching in the testrunner is too late - we need to monkey patch using something like site.py or other means that perform the monkeypatch first thing before importing anything else. One option is to have our own nosetest executable: 1 #!/usr/bin/python 2 # EASY-INSTALL-ENTRY-SCRIPT: 'nose==1.3.3','console_scripts','nosetests' 3 __requires__ = 'nose==1.3.3' 4 import sys Here we can import pthreading and monkey patch. 5 from pkg_resources import load_entry_point 6 7 if __name__ == '__main__': 8 sys.exit( 9 load_entry_point('nose==1.3.3', 'console_scripts', 'nosetests')() 10 ) Turns out that the issue was importing and running pthreading.monkey_patch twice in the tests, because we used testrunner both as script and library. The attached patch fixes this issue. CodeChange only or is it easy for a verification? If the latter please provide steps for verification. Thx. this is not really testable by QA, it is code change in devel nose tests. |