mirakuru.exceptions.AlreadyRunning
- When using xdist postgresql_proc_fixture's get_port
may return the same port number
#872
Labels
What action do you want to perform
Use this fixture with pytest xdist
What are the results
Around 50% of the time, tests would throw an error with
mirakuru.exceptions.AlreadyRunning
What are the expected results
Ideal: Should use a port number / range based on the xdist worker id
Alternative solution: create a port range
postgresql_my_proc = factories.postgresql_proc(port=random.randint(10000, 50000))
-- it is possible with this method that ports still conflict.I am currently working through on how I would implement the ideal solution, currently working with the alternative approach
Why is this happening?
When concurrently executing session fixtures postgresql_proc_fixture's
get_port
may return the same port number. When the same port number is used the tests will (correctly) fail with amirakuru.exceptions.AlreadyRunning
.The text was updated successfully, but these errors were encountered: