Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytest-rerunfailures slows down pytest-xdist testing #242

Closed
mtelka opened this issue Nov 13, 2023 · 3 comments
Closed

pytest-rerunfailures slows down pytest-xdist testing #242

mtelka opened this issue Nov 13, 2023 · 3 comments
Labels
help wanted a pull request to fix this issue is welcome

Comments

@mtelka
Copy link

mtelka commented Nov 13, 2023

I tried to run tests for pytest-xdist with pytest-rerunfailures installed and disabled using -p no:rerunfailures set in PYTEST_ADDOPTS environment variable. I noticed that with this setup the pytest-xdist tests takes very long time (over one hour on my testing machine) and CPU is heavily utilized. Without the pytest-rerunfailures installed the pytest-xdist testing completes in about 3 minutes on my machine.

Version info:

  • pytest-rerunfailures 12.0
  • pytest-xdist 3.4.0
  • pytest 7.4.3
  • Python 3.9.16
@mtelka
Copy link
Author

mtelka commented Nov 13, 2023

Actually, the testing takes far more than one hour because it looks like it exponentially slows down. After ca 20 minutes the pytest-xdist testing progress was at about 30%, after 50 minutes it was at 40%. After that I had to stop the test run.

@icemac icemac added the help wanted a pull request to fix this issue is welcome label Nov 14, 2023
@icemac
Copy link
Contributor

icemac commented Nov 14, 2023

Support for xdist was added in #53 (6 years ago) and improved in several following PRs. There have not yet been any issues reported. Thus I have no idea what could be the problem there.

@mtelka
Copy link
Author

mtelka commented Jul 17, 2024

Since the pytest-rerunfailures is not needed to test pytest-xdist then we should simply do not install (or load) it while testing pytest-xdist.

@mtelka mtelka closed this as completed Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted a pull request to fix this issue is welcome
Projects
None yet
Development

No branches or pull requests

2 participants