I enjoyed following this tip on how to run the pry debugger inside my Phoenix controller tests:
require IEx in the target file- add
IEx.pry to the desired line - run tests inside IEx:
iex -S mix test --trace
But after a few seconds this error always appeared:
16:51:08.108 [error] Postgrex.Protocol (#PID<0.250.0>) disconnected: ** (DBConnection.ConnectionError) owner #PID<0.384.0> timed out because it owned the connection for longer than 15000ms
As stated in the message, the connection to the database appears at that moment, and any commands that cause the connection to the database will fail using DBConnection.OwnershipError . How do I report a database connection to a timeout so that I can safely debug my tests?
source share