       [strategy: :one_for_one, name: {:via, :global, __MODULE__}])
     assert capture_log(:info, fn ->
       ref = Process.monitor(pid)
-      Supervisor.start_child(pid, worker(Task, [:timer, :sleep, [500]]))
+      Supervisor.start_child(pid, worker(Task, [__MODULE__, :sleep, [self()]]))
       Process.exit(pid, :normal)
       receive do: ({:DOWN, ^ref, _, _, _} -> :ok)
     end) =~ ~r"""

      [strategy: :one_for_one, name: {:global, __MODULE__}])
    assert capture_log(:info, fn ->
      ref = Process.monitor(pid)
      Supervisor.start_child(pid, worker(Task, [:timer, :sleep, [500]]))
      Process.exit(pid, :normal)
      receive do: ({:DOWN, ^ref, _, _, _} -> :ok)
    end) =~ ~r"""

    Ancestors: \[#PID<\d+\.\d+\.\d+>\]
    Neighbours:
        Logger.TranslatorTest \(#PID<\d+\.\d+\.\d+>\)
            Initial Call: Logger.TranslatorTest.sleep/1
            Current Call: Logger.TranslatorTest.sleep/1
            Ancestors: \[#PID<\d+\.\d+\.\d+>, #PID<\d+\.\d+\.\d+>\]
    """
  end
