Skip to content

Instantly share code, notes, and snippets.

@nburkley
Created February 15, 2018 09:46
Show Gist options
  • Save nburkley/92afebb90d61739bf5a0a77d38a63565 to your computer and use it in GitHub Desktop.
Save nburkley/92afebb90d61739bf5a0a77d38a63565 to your computer and use it in GitHub Desktop.
Prevent Timeout in ExUnit tests
# in test/test_helper.exs
ExUnit.configure(timeout: :infinity)
ExUnit.start
# ...
# when using ecto change/add ownership timeout in config.exs
config :myapp, MyApp.Repo,
adapter: Ecto.Adapters.Postgres, # not important
username: "mydatabaseuser", # not important
database: "myapp_test", # not important
hostname: "localhost", # not important
pool: Ecto.Adapters.SQL.Sandbox, # not important
ownership_timeout: 999999 # important - increse timeout
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment