Ash FrameworkAF
Ash Framework2mo ago
4 replies
nicolkill

How to avoid after_transaction in some cases

I have an action with the after_transaction but during tests setup i create a lot of records and all calls the after_transaction function and almost all cases crashes for database connection, exists a way to avoid that step for tests or a way to improve the database connection in testing

db error
* %DBConnection.ConnectionError{message: "could not checkout the connection owned by #PID<0.1169.0>. When using the sandbox, connections are shared, so this may imply another process is using a connection. Reason: connection not available and request was dropped from queue after 120ms. You can configure how long requests wait in the queue using :queue_target and :queue_interval. See DBConnection.start_link/2 for more information", severity: :error, reason: :queue_timeout}
Was this page helpful?