I was happily following this advice on how to run a pry debugger inside my Phoenix controller tests:
require IEx
in the target file- add
IEx.pry
to the desired line - run the 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 the message says, the database connection appears to time out at this point and any commands that invoke the database connection will error out with a DBConnection.OwnershipError
. How do I tell my database connection not to time out so I can debug my tests in peace?
Aucun commentaire:
Enregistrer un commentaire