Move monkey patch to keystone-all startup.
bug 1020569 Change-Id: I26c467dc6d96476f2a44b875bddf2cf3aec41859
This commit is contained in:
parent
f584c06aaa
commit
81cb2ab2f5
@ -2,6 +2,7 @@
|
||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
|
||||
import greenlet
|
||||
import eventlet
|
||||
import logging
|
||||
import os
|
||||
import signal
|
||||
@ -17,6 +18,8 @@ if os.path.exists(os.path.join(possible_topdir,
|
||||
'__init__.py')):
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
eventlet.patcher.monkey_patch(all=False, socket=True, time=True, thread=True)
|
||||
|
||||
from paste import deploy
|
||||
|
||||
from keystone import config
|
||||
|
@ -23,7 +23,6 @@
|
||||
import sys
|
||||
|
||||
import eventlet.wsgi
|
||||
eventlet.patcher.monkey_patch(all=False, socket=True, time=True, thread=True)
|
||||
import routes.middleware
|
||||
import ssl
|
||||
import webob.dec
|
||||
|
@ -55,7 +55,7 @@ To run a single test module:
|
||||
python run_tests.py api.test_wsgi
|
||||
|
||||
"""
|
||||
|
||||
import eventlet
|
||||
import heapq
|
||||
import os
|
||||
import unittest
|
||||
@ -337,6 +337,7 @@ if __name__ == '__main__':
|
||||
# If any argument looks like a test name but doesn't have "nova.tests" in
|
||||
# front of it, automatically add that so we don't have to type as much
|
||||
show_elapsed = True
|
||||
do_monkeypatch = True
|
||||
argv = []
|
||||
for x in sys.argv:
|
||||
if x.startswith('test_'):
|
||||
@ -345,9 +346,13 @@ if __name__ == '__main__':
|
||||
argv.append(x)
|
||||
elif x.startswith('--hide-elapsed'):
|
||||
show_elapsed = False
|
||||
elif x.startswith('--no-monkeypatch'):
|
||||
do_monkeypatch = False
|
||||
else:
|
||||
argv.append(x)
|
||||
|
||||
if do_monkeypatch:
|
||||
eventlet.patcher.monkey_patch(all=False, socket=True, time=True,
|
||||
thread=True)
|
||||
testdir = os.path.abspath(os.path.join("tests"))
|
||||
c = config.Config(stream=sys.stdout,
|
||||
env=os.environ,
|
||||
|
Loading…
Reference in New Issue
Block a user