Skip to content

Commit 0d4d1e3

Browse files
authored
Fix logger translator tests under Erlang 27.1 (#13839)
1 parent ad4db2e commit 0d4d1e3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/logger/test/logger/translator_test.exs

+8-8
Original file line numberDiff line numberDiff line change
@@ -948,13 +948,13 @@ defmodule Logger.TranslatorTest do
948948
test "translates Supervisor progress" do
949949
{:ok, pid} = Supervisor.start_link([], strategy: :one_for_one)
950950

951-
assert capture_log(:info, fn ->
951+
assert capture_log(:debug, fn ->
952952
ref = Process.monitor(pid)
953953
Supervisor.start_child(pid, worker(Task, [__MODULE__, :sleep, [self()]]))
954954
Process.exit(pid, :normal)
955955
receive do: ({:DOWN, ^ref, _, _, _} -> :ok)
956956
end) =~ ~r"""
957-
\[info\] Child Task of Supervisor #PID<\d+\.\d+\.\d+> \(Supervisor\.Default\) started
957+
\[(debug|info)\] Child Task of Supervisor #PID<\d+\.\d+\.\d+> \(Supervisor\.Default\) started
958958
Pid: #PID<\d+\.\d+\.\d+>
959959
Start Call: Task.start_link\(Logger.TranslatorTest, :sleep, \[#PID<\d+\.\d+\.\d+>\]\)
960960
"""
@@ -963,36 +963,36 @@ defmodule Logger.TranslatorTest do
963963
test "translates Supervisor progress with name" do
964964
{:ok, pid} = Supervisor.start_link([], strategy: :one_for_one, name: __MODULE__)
965965

966-
assert capture_log(:info, fn ->
966+
assert capture_log(:debug, fn ->
967967
ref = Process.monitor(pid)
968968
Supervisor.start_child(pid, worker(Task, [__MODULE__, :sleep, [self()]]))
969969
Process.exit(pid, :normal)
970970
receive do: ({:DOWN, ^ref, _, _, _} -> :ok)
971971
end) =~ ~r"""
972-
\[info\] Child Task of Supervisor Logger.TranslatorTest started
972+
\[(debug|info)\] Child Task of Supervisor Logger.TranslatorTest started
973973
"""
974974

975975
{:ok, pid} = Supervisor.start_link([], strategy: :one_for_one, name: {:global, __MODULE__})
976976

977-
assert capture_log(:info, fn ->
977+
assert capture_log(:debug, fn ->
978978
ref = Process.monitor(pid)
979979
Supervisor.start_child(pid, worker(Task, [__MODULE__, :sleep, [self()]]))
980980
Process.exit(pid, :normal)
981981
receive do: ({:DOWN, ^ref, _, _, _} -> :ok)
982982
end) =~ ~r"""
983-
\[info\] Child Task of Supervisor Logger.TranslatorTest started
983+
\[(debug|info)\] Child Task of Supervisor Logger.TranslatorTest started
984984
"""
985985

986986
{:ok, pid} =
987987
Supervisor.start_link([], strategy: :one_for_one, name: {:via, :global, __MODULE__})
988988

989-
assert capture_log(:info, fn ->
989+
assert capture_log(:debug, fn ->
990990
ref = Process.monitor(pid)
991991
Supervisor.start_child(pid, worker(Task, [__MODULE__, :sleep, [self()]]))
992992
Process.exit(pid, :normal)
993993
receive do: ({:DOWN, ^ref, _, _, _} -> :ok)
994994
end) =~ ~r"""
995-
\[info\] Child Task of Supervisor Logger.TranslatorTest started
995+
\[(debug|info)\] Child Task of Supervisor Logger.TranslatorTest started
996996
"""
997997
end
998998

0 commit comments

Comments
 (0)