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

pytest-randomly seed is not respected when using loadgroup dist

Open alex-nl opened this issue 1 year ago • 0 comments

Based on this issue: https://github.com/pytest-dev/pytest-xdist/issues/229 we expected randomly to play well with xdist

Steps: Repeatedly invoke pytest with the following args: --dist=loadgroup --randomly-seed=1234567890"

Expected: Each worker runs the same set of tests in the same order.

Actual: Each worker starts off by running the same tests, but diverges increasingly over the course of the run.

We'd really love a way to combine parallelization and determinism (while also respecting our xdist_group requirements). Determinism is critical for tracking down tests that flake due to cross test dependency. As of right now we're going to turn off parallelization all together and pay the run time cost, just to make sure that we can always reproduce failure cases.

alex-nl avatar Apr 03 '24 17:04 alex-nl