@@ -538,15 +538,13 @@ defmodule ExUnit.Callbacks do
538
538
test, as simply shutting down the process would cause it to be restarted
539
539
according to its `:restart` value.
540
540
541
- Another advantage is that the test process will act as both an ancestor
542
- as well as a caller to the supervised processes. When a process is started
543
- under a supervision tree, it typically populates the `$ancestors` key in
544
- its process dictionary with all of its ancestors, which will include the test
545
- process. Additionally, `start_supervised/2` will also store the test process
546
- in the `$callers` key of the started process, allowing tools that perform
547
- either ancestor or caller tracking to reach the test process. You can learn
548
- more about these keys in
549
- [the `Task` module](`Task#module-ancestor-and-caller-tracking`).
541
+ Finally, since Elixir v1.17.0, the test supervisor has both `$ancestors`
542
+ and `$callers` key in its process dictionary pointing to the test process.
543
+ This means developers can invoke `Process.get(:"$callers", [])` in their
544
+ `start_link` function and forward it to the spawned process, which may set
545
+ `Process.put(:"$callers", callers)` during its initialization. This may be
546
+ useful in projects who track process ownership during tests. You can learn
547
+ more about these keys in [the `Task` module](`Task#module-ancestor-and-caller-tracking`).
550
548
"""
551
549
@ doc since: "1.5.0"
552
550
@ spec start_supervised ( Supervisor . child_spec ( ) | module | { module , term } , keyword ) ::
0 commit comments