rich-dawn-84724
11/05/2021, 2:40 PMpython_tests
target to to run in series? Using pants 2.7rich-dawn-84724
11/05/2021, 2:45 PMpytest-docker
to bring up a backing service which the tests share (not unlike a test database in Django). Obviously if this happens for all tests, there may be port conflicts etc.
In the ideal world, the tests would be independent, but I'm wondering if there's any way to sacrifice parallelism as a workaround.clean-city-64472
11/05/2021, 3:22 PMn
docker instances running where n
is the number of concurrent executions, you can use the execution_slot_var = "PANTS_EXECUTION_SLOT"
config value to broker tests between the different docker instances.
This how we handle boostrapping multiple copies of the DB when running tests in a parallel environemt. Basically the PANTS_EXEUCTION_SLOT
environment variable is a number between 1
and n
that we use to name/reference a DB.clean-city-64472
11/05/2021, 3:23 PMrich-dawn-84724
11/05/2021, 4:00 PMwith concurrency set to 1How does one set concurrency to 1? I noticed there is a
--no-concurrent
option, but this seems to be related to pants invocations rather than test runs (and is the default behaviour).happy-kitchen-89482
11/05/2021, 4:15 PMhappy-kitchen-89482
11/05/2021, 4:17 PMexecution_slot_var
mechanism to assign a unique one to each running test you'd get the best of both worlds!happy-kitchen-89482
11/05/2021, 4:18 PM