Skip to content

Commit 3865ff9

Browse files
committed
Update docs
1 parent e223a37 commit 3865ff9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/ecto/adapters/sql/sandbox.ex

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ defmodule Ecto.Adapters.SQL.Sandbox do
5454
end
5555
end
5656
57+
If you run into issues with processes accessing your db after tests
58+
complete – e.g. ones stopped in `on_exit` callbacks – consider using
59+
`start_owner!/1` over `checkout/1`.
60+
5761
## Collaborating processes
5862
5963
The example above is straight-forward because we have only
@@ -102,6 +106,9 @@ defmodule Ecto.Adapters.SQL.Sandbox do
102106
the parent's connection (i.e. the test process' connection) to
103107
the task.
104108
109+
Besides calling `allow/3` allowance can also be provided to processes
110+
via [Caller Tracking](`m:Task#module-ancestor-and-caller-tracking`).
111+
105112
Because allowances use an explicit mechanism, their advantage
106113
is that you can still run your tests in async mode. The downside
107114
is that you need to explicitly control and allow every single
@@ -148,7 +155,7 @@ defmodule Ecto.Adapters.SQL.Sandbox do
148155
149156
There are two mechanisms for explicit ownerships:
150157
151-
* Using allowances - requires explicit allowances via `allow/3`.
158+
* Using allowances - requires explicit allowances.
152159
Tests may run concurrently.
153160
154161
* Using shared mode - does not require explicit allowances.

0 commit comments

Comments
 (0)