Giter VIP home page Giter VIP logo

Comments (13)

jcpetruzza avatar jcpetruzza commented on August 25, 2024 2

Hmmm, I think the problem here is:

  1. There was a typo in what @aschmolck was trying: exemodel=eventlet instead of execmodel=eventlet.
  2. pytest_xdist doesn't complain when the argument for execnet is bogus

py.test --tx '2*popen//execmodel=eventlet' --dist load runs the example above in ~4 seconds for me...

from pytest-xdist.

aschmolck avatar aschmolck commented on August 25, 2024

P.S. This is probably the same issue as #61 but the above should make it easy to reproduce.

from pytest-xdist.

jessepollak avatar jessepollak commented on August 25, 2024

We're running into this same issue — has anyone found a workaround?

from pytest-xdist.

RonnyPfannschmidt avatar RonnyPfannschmidt commented on August 25, 2024

with recent execnet you can tell it to use a eventlet backend

from pytest-xdist.

nicoddemus avatar nicoddemus commented on August 25, 2024

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.

aschmolck avatar aschmolck commented on August 25, 2024

@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.

RonnyPfannschmidt avatar RonnyPfannschmidt commented on August 25, 2024

i think it should be --tx 2*popen//execmodel=eventlet

from pytest-xdist.

aschmolck avatar aschmolck commented on August 25, 2024

@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.

RonnyPfannschmidt avatar RonnyPfannschmidt commented on August 25, 2024

use --dist load?

from pytest-xdist.

aschmolck avatar aschmolck commented on August 25, 2024

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.

RonnyPfannschmidt avatar RonnyPfannschmidt commented on August 25, 2024

i see, i currently cant test myself, im not sure what is going wrong and what part is being conflicted

from pytest-xdist.

aschmolck avatar aschmolck commented on August 25, 2024

Would it be possible to re-open this?

from pytest-xdist.

RonnyPfannschmidt avatar RonnyPfannschmidt commented on August 25, 2024

i see, thanks

from pytest-xdist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.