Do any of the tests (not necessarily the ones that are failing) start long-running processes? One thing that can produce this sort of message is a process that’s linked to the test process but outlives it.
There are a decent number of LiveView tests that themselves are fairly long-lived. Randomly, I received a longer error message from a disconnection message:
Client #PID<0.34370.0> is still using a connection from owner at location:
and that stacktrace points to a LiveComponent which starts another Task which seems like it kicks off some db queries.
In order to replicate the failure, you can use --seed option with seed number of failed test suite.
If failed test have async: true, try to set it to false
That should give you some insight on what starts and when. Could be useful.
And yeah use a fixed seed for a time, until you sort out this problem. E.g. mix test --seed 0. Tests will be executed in exactly the same order every time so it can help you pinpoint a problem.