You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #332 we added the Repo's name (via a label) to ownership errors.
We didn't add it to timeout errors yet because it's more complex, but José expressed interest in doing it later - see comment thread.
For this issue, I just want to document the difference with a simple reproduction:
defmoduleDbConnectionErrorTestdouseExUnit.CasealiasMyApp.Repotest"Unhandled case: trigger timeout error"doEcto.Adapters.SQL.Sandbox.checkout(Repo,ownership_timeout: 100)Repo.transact(fn->Repo.query!("CREATE TEMP TABLE dogs (name text) ON COMMIT DROP")# Hold the connection longer than the ownership_timeout above.Process.sleep(200)# Raises an exception that does not include the repo nameRepo.insert_all("dogs",[%{name: "Barkley"}]){:ok,:ok}end)endtest"Handled case: trigger ownership error"do# Raises an exception that includes the Repo name (as of PR 332)spawn(fn->Process.sleep(1_000)Repo.query!("SELECT 1")end)on_exit(fn->Process.sleep(1500)end)endend
Activity