Comments (13)
Hmmm, I think the problem here is:
- There was a typo in what @aschmolck was trying:
exemodel=eventlet
instead ofexecmodel=eventlet
. pytest_xdist
doesn't complain when the argument forexecnet
is bogus
py.test --tx '2*popen//execmodel=eventlet' --dist load
runs the example above in ~4 seconds for me...
from pytest-xdist.
P.S. This is probably the same issue as #61 but the above should make it easy to reproduce.
from pytest-xdist.
We're running into this same issue — has anyone found a workaround?
from pytest-xdist.
with recent execnet you can tell it to use a eventlet backend
from pytest-xdist.
Here's the docs on how to configure exenet to use eventlet. Closing this for now, if anybody still has questions please ask and we can reopen this.
from pytest-xdist.
@nicoddemus Could you maybe show how to run my minimal example above without hanging?
If I change the final line of my example from py.test -n 2
to
py.test -n 2 --tx popen//execmodel=eventlet
it still hangs as before. I seem to have the latest version of execnet installed (1.4.1).
from pytest-xdist.
i think it should be --tx 2*popen//execmodel=eventlet
from pytest-xdist.
@RonnyPfannschmidt thanks, this does indeed not hang anymore. On the other hand, it doesn't seem to result in any parallelism either. :(
cat > blah.py <<EOF
import eventlet
eventlet.monkey_patch()
def f(x):
return x + 1
EOF
cat > test_blah.py <<EOF
import blah
import time
def test_stuff():
time.sleep(4)
assert blah.f(1) == 2
EOF
cat > test_blah2.py <<EOF
import blah
import time
def test_stuff_again():
time.sleep(4)
assert blah.f(1) == 2
EOF
time py.test --tx '2*popen//exemodel=eventlet'
0.50s user 0.01s system 5% cpu 8.520 total
from pytest-xdist.
use --dist load?
from pytest-xdist.
Hangs for me. Does it work for you? Pasting the snippet I posted above literally into a terminal should work, if you do have eventlet and pytest_xdist installed (e.g. via pip install eventlet==0.19.0 pytest_xdist==1.14 pytest
).
from pytest-xdist.
i see, i currently cant test myself, im not sure what is going wrong and what part is being conflicted
from pytest-xdist.
Would it be possible to re-open this?
from pytest-xdist.
i see, thanks
from pytest-xdist.
Related Issues (20)
- [REGRESSION][`pytest-xdist == 3.6.0`] Makes pre-existing pytest configurations crash with `execnet.gateway_base.RemoteError: concurrent remote_exec would cause deadlock for main_thread_only execmodel` HOT 13
- pytest: error: unrecognized arguments: -n HOT 4
- pytest-xdist gets crashed with `AssertionError` HOT 3
- Include module doctests when using `--looponfail`
- RSync Deprecation Validation HOT 1
- loadscope incorrectly modifying test ordering, when ordering is relevant HOT 11
- pytest-asyncio Hangs near finish using GPT-3.5 inference fixture
- Rsync deprecation warning HOT 2
- Any option to run parallelized testing ONLY if the number of tests collected is more than say 20? HOT 2
- last failed is not honored when collection error occurs
- worker_internal_error - can someone help me creating a good bug report? HOT 2
- stuck replacing workers - maybe is related with pytest-timeout plugin?
- No timestamp in when failures are printed out HOT 2
- Have pytest-xdist respect the order set by pytest-order
- `pytest_xdist_auto_num_workers` function cannot be conditionally defined HOT 1
- Improve autodetection of number of (available CPUs) HOT 3
- pytest xdist abruptly exits with exit code 0 when running on Github Actions HOT 2
- Performance Degradation in Kubernetes with pytest-xdist
- exitfirst should mark all unrun tests as "failed" for the purpose of last-failed and friends HOT 1
- make `--dist loadgroup` the default value
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-xdist.