pytest-dev / pytest-dev/pytest-xdist
pytest does not run tests in parallel and hangs after running first test
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 287
- Avg merge
- 9h 30m
- Merged PRs (30d)
- 2
Description
I'm facing a very weird issue.
When I try to run my test in parallel-
Only 1 browser opens even when I execute pytest -n 2
After first test is successful, pytest just hangs and it does not even timeout
Has anyone faced this issue?
py.test -vv -n 2
=================================================================================================== test session starts ===================================================================================================
platform darwin -- Python 3.7.3, pytest-5.4.1, py-1.10.0, pluggy-0.13.1 --
///*
cachedir: .pytest_cache
rootdir: //, inifile: pytest.ini
plugins: xdist-1.31.0, allure-pytest-2.8.40, repeat-0.9.1, forked-1.1.3, timeout-1.4.2
[gw0] darwin Python 3.7.3 cwd:
//
[gw1] darwin Python 3.7.3 cwd:
/**/*
collected 8 items
[gw0] Python 3.7.3 (default, Apr 24 2020, 18:51:23) -- [Clang 11.0.3 (clang-1103.0.32.62)]
[gw1] Python 3.7.3 (default, Apr 24 2020, 18:51:23) -- [Clang 11.0.3 (clang-1103.0.32.62)]
gw0 [8] / gw1 [8]
scheduling tests via MarkBasedScheduler
test1
[gw1] [ 12%] PASSED test1
It will get stuck after this.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing py.test -vv -n 2 in the reported Python 3.7.3, pytest 5.4.1, and xdist 1.31.0 environment, then compare the parallel run with a normal run. The report provides no project files or failing test, so done means identifying the cause of the hang and confirming that the reported eight-test run completes in parallel.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100