mssql_ecto
mssql_ecto copied to clipboard
Concurrent DB Tests Failing
Cannot run tests after swapping postgres to MS SQL.
Expected Behavior
Tests should run without issue.
Current Behavior
Tests are failing, saying:
18:42:34.953 [error] GenServer #PID<0.322.0> terminating
** (stop) exited in: :gen_server.call(#PID<0.252.0>, {:checkout, #Reference<0.3768785716.1265631238.47152>, true, :infinity}, 5000)
** (EXIT) time out
(db_connection) lib/db_connection/poolboy.ex:112: DBConnection.Poolboy.checkout/3
(ecto) lib/ecto/adapters/sql/sandbox.ex:386: Ecto.Adapters.SQL.Sandbox.Pool.checkout/2
(db_connection) lib/db_connection/ownership/proxy.ex:108: DBConnection.Ownership.Proxy.handle_call/3
(stdlib) gen_server.erl:636: :gen_server.try_handle_call/4
(stdlib) gen_server.erl:665: :gen_server.handle_msg/6
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message (from #PID<0.321.0>): {:init, 15000}
Possible Solution
Do not check out DB connection.
Steps to Reproduce (for bugs)
- Clone https://github.com/HangingClowns/mssql_ecto_issue
- Run docker-compose up to turn on MSSql DB
- Run
mix testfrom sample project:
Context
Just trying to run the tests.
Your Environment
- MssqlEcto version: 1.1.0
- Ecto version: 2.2.9
- Elixir version: 1.6.4
- Erlang version: 9.3 (OTP 20.3.2)
- Microsoft SQL Server version: whatever is in docker image
ab22b8353bbd, was tagged as latest 8 weeks ago - Operating System and version: Mac 10.13.4
- Link to your project: https://github.com/HangingClowns/mssql_ecto_issue
check out this issue https://github.com/elixir-ecto/db_connection/issues/127, according to this you must update your OTP version to 21.0.2