pytest-rerunfailures icon indicating copy to clipboard operation
pytest-rerunfailures copied to clipboard

`pytest-rerunfailures` slows down `pytest-xdist` testing

Open mtelka opened this issue 2 years ago • 2 comments

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 avatar Nov 13 '23 15:11 mtelka

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.

mtelka avatar Nov 13 '23 16:11 mtelka

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.

icemac avatar Nov 14 '23 07:11 icemac

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 avatar Jul 17 '24 06:07 mtelka