https://pantsbuild.org/ logo
#general
Title
# general
c

cold-branch-54016

12/19/2022, 3:28 PM
Hey all, Is there anyway to disable the parallel execution of tests per file in pants? We have some long running setup fixtures that we need for most tests but creating them for every file separately increased the overall test runtime drastically. Previously we have just used the
pytest-xdist
plugin with 8 workers, each worker then ran these fixtures once and the tests were evenly distributed across the workers. I am also open for other suggestions on how to potentially solve this issue.
r

refined-addition-53644

12/19/2022, 3:34 PM
c

cold-branch-54016

12/19/2022, 3:50 PM
I will have a look at that thank you!
h

happy-kitchen-89482

12/19/2022, 7:36 PM
I think that's a little different? That thread is asking about reducing parallelism to conserve RAM, and it sounds like you're asking about batching more than one test file per process, to save on setup overhead?
c

cold-branch-54016

12/20/2022, 8:48 AM
Thank you Benjy, the
batch_compatibility_tag
options is exactly what I was looking for 🙂
2 Views