Closed nMustaki closed 8 years ago
Trying to test app with gevent, I have similar problem but with such traceback:
Traceback (most recent call last):
File "/home/art/.envs/proj/bin/green", line 9, in <module>
load_entry_point('green==2.2.0', 'console_scripts', 'green')()
File "/home/art/.envs/proj/local/lib/python2.7/site-packages/green/cmdline.py", line 75, in main
result = run(test_suite, stream, args, testing)
File "/home/art/.envs/proj/local/lib/python2.7/site-packages/green/runner.py", line 92, in run
targets = [(target, manager.Queue()) for target in toParallelTargets(suite, args.targets)]
File "/usr/lib/python2.7/multiprocessing/managers.py", line 667, in temp
token, exp = self._create(typeid, *args, **kwds)
File "/usr/lib/python2.7/multiprocessing/managers.py", line 565, in _create
conn = self._Client(self._address, authkey=self._authkey)
File "/usr/lib/python2.7/multiprocessing/connection.py", line 175, in Client
answer_challenge(c, authkey)
File "/usr/lib/python2.7/multiprocessing/connection.py", line 428, in answer_challenge
message = connection.recv_bytes(256) # reject large message
IOError: [Errno 11] Resource temporarily unavailable
BTW, I found this thread on stackoverflow. It is about how badly multiprocessing plays with gevent. There is also an interesing answer from ddotsenko who wrote a plugin for nose to run tests in subprocesses but without multiprocessing and issues with gevent.
Sorry for the huge delay.
I'm really not interested in diving into crazy world of multprocessing vs. gevent.
If anyone has fixes they want to propose, I'm happy to help make sure they don't break any existing functionality and get them released, but short of that my answer is going to be: green doesn't play nice with gevent.
Hi,
I understand your point of view, but can you at least add a disclaimer in the readme about this fact so fewer people loose time on this ? Thanks !
Absolutely. That's a great idea.
Hi,
first thanks for Green, I love its speed and colors ! I am trying to test a Flask application, but I get a deadlock if I use together :
Everything works fine if I do any of the following :
The deadlock happens after my create_app function (required by flask-testing), and before starting to run (or at least print) the first test. Example output :
I've just removed Flask-Testing so the issue is "gone" for me, but maybe this issue could help somebody else someday...