Closed melpon closed 6 years ago
In db_connection 2.0.0:
def ownership_checkout(manager, opts) do with {:ok, pid} <- Manager.checkout(manager, opts) do case Holder.checkout(pid, opts) do
And Manager.checkout/2 spec:
Manager.checkout/2
@spec checkout(GenServer.server, Keyword.t) :: :ok | {:already, :owner | :allowed}
As a result, Ecto.Adapters.SQL.Sandbox.checkout/2 returns :ok, but Holder.checkout/2 has not called.
Ecto.Adapters.SQL.Sandbox.checkout/2
:ok
Holder.checkout/2
Good catch, thank you!
In db_connection 2.0.0:
And
Manager.checkout/2
spec:As a result,
Ecto.Adapters.SQL.Sandbox.checkout/2
returns:ok
, butHolder.checkout/2
has not called.