is there a way to make (some) tests run serially? ...
# general
a
is there a way to make (some) tests run serially? we have some tests that run against a live system and can't be run in parallel. At the moment we're doing two calls to
./pants test
with the non-parallel ones being called with
--test-debug
or whatever the flag is. But we're adding more live-systems that can be run in parallel with each other, and as things grow everything's getting slower by multiples. e.g. tests
a_1, a_2, a_3
must be run serially. and
b_1, b_2, b_3
must be run serially. But
a_1
and
b_1
could be run in parallel. If not supported OOTB, is there a path to implementing this with a plugin?
b
We solved this in our testing framework using a file lock with a customizable name. The name helps with the grouping and the file lock helps make it "serial". It definitely is not the ideal solution, but it works
a
yeah, this is an option, but would require rewriting large amounts of code 😬
b
For us, it's Python, so it was a simple pytest fixture.