FreeOpcUa / opcua-asyncio

OPC UA library for python >= 3.7
GNU Lesser General Public License v3.0
1.11k stars 358 forks source link

ci:use pytest-xdist to parallelize tests #1623

Open alexrudd2 opened 5 months ago

alexrudd2 commented 5 months ago

https://pypi.org/project/pytest-xdist/

Also I'm pretty sure -s has no effect since Pytest 3.4

oroulet commented 5 months ago

Does it handle having some servers run on the same port? At least it looks like the failed tests are releated to something different....

alexrudd2 commented 5 months ago

It doesn't do anything automatically (besides run tests in parallel). So the tests might have to be changed to use different ports.

In the past I've used @pytest.mark.parameterize to do this but I'm not sure how these tests are setup.

alexrudd2 commented 5 months ago

What about binding to port 0, which will cause the OS to assign a random available port? After the server is created, the assigned port can be determined with srv.bserver.port and given to the client.