Yes, thanks! You’ll see we also get these other errors/warnings with that dataset only:
robb@arbor ~/s/M/phoenix (master) [1]> mix test
13:15:43.764 [error] Postgrex.Protocol (#PID<0.547.0>) disconnected: ** (DBConnection.ConnectionError) #PID<0.90.0> checked in the connection owned by #PID<0.621.0>
#PID<0.90.0> triggered the checkin at location:
(kernel) code_server.erl:140: :code_server.call/1
(elixir) src/elixir_compiler.erl:80: :elixir_compiler.dispatch/4
(elixir) src/elixir_compiler.erl:63: :elixir_compiler.compile/3
(elixir) src/elixir_lexical.erl:17: :elixir_lexical.run/2
(elixir) src/elixir_compiler.erl:23: :elixir_compiler.quoted/2
(elixir) lib/code.ex:767: Code.require_file/2
(elixir) lib/enum.ex:769: Enum."-each/2-lists^foreach/1-0-"/2
(elixir) lib/enum.ex:769: Enum.each/2
Client #PID<0.621.0> is still using a connection from owner at location:
:prim_inet.ctl_cmd/3
:prim_inet.async_recv/3
:prim_inet.recv0/3
(postgrex) lib/postgrex/protocol.ex:2879: Postgrex.Protocol.rows_recv/5
(postgrex) lib/postgrex/protocol.ex:1898: Postgrex.Protocol.recv_execute/5
(postgrex) lib/postgrex/protocol.ex:1772: Postgrex.Protocol.bind_execute/4
(db_connection) lib/db_connection/holder.ex:293: DBConnection.Holder.holder_apply/4
(db_connection) lib/db_connection.ex:1255: DBConnection.run_execute/5
The connection itself was checked out by #PID<0.621.0> at location:
(ecto_sql) lib/ecto/adapters/sql.ex:570: Ecto.Adapters.SQL.execute!/4
13:15:43.810 [error] GenServer #PID<0.621.0> terminating
** (DBConnection.ConnectionError) tcp recv: closed (the connection was closed by the pool, possibly due to a timeout or because the pool has been terminated)
(ecto_sql) lib/ecto/adapters/sql.ex:629: Ecto.Adapters.SQL.raise_sql_call_error/1
(ecto_sql) lib/ecto/adapters/sql.ex:562: Ecto.Adapters.SQL.execute/5
(ecto) lib/ecto/repo/queryable.ex:177: Ecto.Repo.Queryable.execute/4
(ecto) lib/ecto/repo/queryable.ex:17: Ecto.Repo.Queryable.all/3
(macrostax) lib/macrostax/accounts/signup_worker.ex:31: Macrostax.Accounts.SignupWorker.check_abandoned/0
(macrostax) lib/macrostax/accounts/signup_worker.ex:23: Macrostax.Accounts.SignupWorker.handle_info/2
(stdlib) gen_server.erl:637: :gen_server.try_dispatch/4
(stdlib) gen_server.erl:711: :gen_server.handle_msg/6
Last message: :check_abandoned
13:15:43.893 [error] GenServer #PID<0.669.0> terminating
** (DBConnection.OwnershipError) cannot find ownership process for #PID<0.669.0>.
When using ownership, you must manage connections in one
of the four ways:
* By explicitly checking out a connection
* By explicitly allowing a spawned process
* By running the pool in shared mode
* By using :caller option with allowed process
The first two options require every new process to explicitly
check a connection out or be allowed by calling checkout or
allow respectively.
The third option requires a {:shared, pid} mode to be set.
If using shared mode in tests, make sure your tests are not
async.
The fourth option requires [caller: pid] to be used when
checking out a connection from the pool. The caller process
should already be allowed on a connection.
If you are reading this error, it means you have not done one
of the steps above or that the owner process has crashed.
See Ecto.Adapters.SQL.Sandbox docs for more information.
(ecto_sql) lib/ecto/adapters/sql.ex:626: Ecto.Adapters.SQL.raise_sql_call_error/1
(ecto_sql) lib/ecto/adapters/sql.ex:562: Ecto.Adapters.SQL.execute/5
(ecto) lib/ecto/repo/queryable.ex:177: Ecto.Repo.Queryable.execute/4
(ecto) lib/ecto/repo/queryable.ex:17: Ecto.Repo.Queryable.all/3
(macrostax) lib/macrostax/accounts/signup_worker.ex:31: Macrostax.Accounts.SignupWorker.check_abandoned/0
(macrostax) lib/macrostax/accounts/signup_worker.ex:23: Macrostax.Accounts.SignupWorker.handle_info/2
(stdlib) gen_server.erl:637: :gen_server.try_dispatch/4
(stdlib) gen_server.erl:711: :gen_server.handle_msg/6
Last message: :check_abandoned
13:15:43.894 [error] GenServer #PID<0.671.0> terminating
** (DBConnection.OwnershipError) cannot find ownership process for #PID<0.671.0>.
When using ownership, you must manage connections in one
of the four ways:
* By explicitly checking out a connection
* By explicitly allowing a spawned process
* By running the pool in shared mode
* By using :caller option with allowed process
The first two options require every new process to explicitly
check a connection out or be allowed by calling checkout or
allow respectively.
The third option requires a {:shared, pid} mode to be set.
If using shared mode in tests, make sure your tests are not
async.
The fourth option requires [caller: pid] to be used when
checking out a connection from the pool. The caller process
should already be allowed on a connection.
If you are reading this error, it means you have not done one
of the steps above or that the owner process has crashed.
See Ecto.Adapters.SQL.Sandbox docs for more information.
(ecto_sql) lib/ecto/adapters/sql.ex:626: Ecto.Adapters.SQL.raise_sql_call_error/1
(ecto_sql) lib/ecto/adapters/sql.ex:562: Ecto.Adapters.SQL.execute/5
(ecto) lib/ecto/repo/queryable.ex:177: Ecto.Repo.Queryable.execute/4
(ecto) lib/ecto/repo/queryable.ex:17: Ecto.Repo.Queryable.all/3
(macrostax) lib/macrostax/accounts/signup_worker.ex:31: Macrostax.Accounts.SignupWorker.check_abandoned/0
(macrostax) lib/macrostax/accounts/signup_worker.ex:23: Macrostax.Accounts.SignupWorker.handle_info/2
(stdlib) gen_server.erl:637: :gen_server.try_dispatch/4
(stdlib) gen_server.erl:711: :gen_server.handle_msg/6
Last message: :check_abandoned
13:15:43.894 [error] GenServer #PID<0.672.0> terminating
** (DBConnection.OwnershipError) cannot find ownership process for #PID<0.672.0>.
When using ownership, you must manage connections in one
of the four ways:
* By explicitly checking out a connection
* By explicitly allowing a spawned process
* By running the pool in shared mode
* By using :caller option with allowed process
The first two options require every new process to explicitly
check a connection out or be allowed by calling checkout or
allow respectively.
The third option requires a {:shared, pid} mode to be set.
If using shared mode in tests, make sure your tests are not
async.
The fourth option requires [caller: pid] to be used when
checking out a connection from the pool. The caller process
should already be allowed on a connection.
If you are reading this error, it means you have not done one
of the steps above or that the owner process has crashed.
See Ecto.Adapters.SQL.Sandbox docs for more information.
(ecto_sql) lib/ecto/adapters/sql.ex:626: Ecto.Adapters.SQL.raise_sql_call_error/1
(ecto_sql) lib/ecto/adapters/sql.ex:562: Ecto.Adapters.SQL.execute/5
(ecto) lib/ecto/repo/queryable.ex:177: Ecto.Repo.Queryable.execute/4
(ecto) lib/ecto/repo/queryable.ex:17: Ecto.Repo.Queryable.all/3
(macrostax) lib/macrostax/accounts/signup_worker.ex:31: Macrostax.Accounts.SignupWorker.check_abandoned/0
(macrostax) lib/macrostax/accounts/signup_worker.ex:23: Macrostax.Accounts.SignupWorker.handle_info/2
(stdlib) gen_server.erl:637: :gen_server.try_dispatch/4
(stdlib) gen_server.erl:711: :gen_server.handle_msg/6
Last message: :check_abandoned
Excluding tags: [:skip, :hits_external_api]
.......
1) test migrate_food/1 given a simple meal: creates Recipes, Foods, Conversions, and Tags with expected hierarchy (Macrostax.Utils.KitchenSchemaMigratorTest)
test/macrostax/utils/kitchen_schema_migrator_test.exs:17
** (RuntimeError) could not lookup Ecto repo Macrostax.Repo because it was not started or it does not exist
stacktrace:
(ecto) lib/ecto/repo/registry.ex:19: Ecto.Repo.Registry.lookup/1
(ecto) lib/ecto/adapter.ex:127: Ecto.Adapter.lookup_meta/1
(ecto_sql) lib/ecto/adapters/sql/sandbox.ex:487: Ecto.Adapters.SQL.Sandbox.lookup_meta!/1
(ecto_sql) lib/ecto/adapters/sql/sandbox.ex:415: Ecto.Adapters.SQL.Sandbox.checkout/2
(macrostax) test/support/data_case.ex:30: Macrostax.DataCase.__ex_unit_setup_0/1
(macrostax) test/support/data_case.ex:1: Macrostax.DataCase.__ex_unit__/2
test/macrostax/utils/kitchen_schema_migrator_test.exs:1: Macrostax.Utils.KitchenSchemaMigratorTest.__ex_unit__/2
After resetting the test db, we don’t get warnings about the code. Instead, it’s just all green:
robb@arbor ~/s/M/phoenix (master)> mix test
Excluding tags: [:skip, :hits_external_api]
..........................................................................................................................
Finished in 12.3 seconds
142 tests, 0 failures, 20 excluded
Randomized with seed 149348