findmypast-oss / mssql_ecto

Ecto adapter for Mssqlex
Apache License 2.0
49 stars 20 forks source link

Concurrent DB Tests Failing #36

Open allenwyma opened 6 years ago

allenwyma commented 6 years ago

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)

  1. Clone https://github.com/HangingClowns/mssql_ecto_issue
  2. Run docker-compose up to turn on MSSql DB
  3. Run mix test from sample project:

Context

Just trying to run the tests.

Your Environment

dimun commented 5 years ago

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