Skip to content

Commit 1298142

Browse files
authored
use pid instead of process name in allow example (#303)
It seems like `allow/3` [expects](https://github.com/elixir-ecto/db_connection/blob/a588895d35ae8913ab1d86d734df9129f0c59855/lib/db_connection/ownership/manager.ex#L38) a pid to be given.
1 parent bb8db20 commit 1298142

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/ecto/adapters/sql/sandbox.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ defmodule Ecto.Adapters.SQL.Sandbox do
9393
to collaborate over the same connection. Let's give it a try:
9494
9595
test "calls worker that runs a query" do
96-
Ecto.Adapters.SQL.Sandbox.allow(Repo, self(), MyApp.Worker)
96+
allow = Process.whereis(MyApp.Worker)
97+
Ecto.Adapters.SQL.Sandbox.allow(Repo, self(), allow)
9798
GenServer.call(MyApp.Worker, :run_query)
9899
end
99100

0 commit comments

Comments
 (0)