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