Today I Learned

hashrocket A Hashrocket project

Ecto 2.0 ownership timeout #myelixirstatus

Ecto 2.0, gives us concurrent testing against the DB by allowing an Elixir process to own a database connection. The default time releases the connection pretty quick, so it's not suitable for debugging anything thats non-trivial.

We can change the timeout in our config/test.exs

config :my_app, MyApp.Repo,
  adapter: Ecto.Adapters.Postgres,
  ownership_timeout: 60_000

See More #elixir TILs
Looking for help? At Hashrocket, we 💜 Elixir! From our many Elixir client projects, to sponsoring the Chicago Elixir Meetup, to the source code for this application, we are invested in this community. Contact us today to talk about your Elixir project.