Test errors with supervisor and Postgrex (Ecto)

Hey,

I have a supervisor task which keeps on throwing error messages when I’m testing. All tests pass, nothing fails and the task is working great in production. It looks like the reason for these errors is because some connection from the task is still open to Postgres when the tests complete.

This is the error I’m getting:

[error] Postgrex.Protocol (#PID<0.314.0>) disconnected: ** (DBConnection.ConnectionError) owner #PID<0.480.0> exited

Client #PID<0.482.0> is still using a connection from owner at location:

Would be great to understand how I can resolve this, thanks! :wink:

2 Likes