I'm using pytest-xdist plugin to run some test using the @pytest.mark.parametrize
to run the same test with different parameters.
As part of these tests, I need to open/close web servers and the ports are generated at collection time.
xdist does the test collection on the slave and they are not synchronised, so how can I guarantee uniqueness for the port generation.
I can use the same port for each slave but I don't know how to archive this.