From 3a192b36e184bff6170c0d6abec5961e48c9d9b5 Mon Sep 17 00:00:00 2001 From: Igor Goryachev Date: Thu, 19 Sep 2024 12:37:00 +0300 Subject: [PATCH] Fix logger translator tests under erlang 27.1 --- lib/logger/test/logger/translator_test.exs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/logger/test/logger/translator_test.exs b/lib/logger/test/logger/translator_test.exs index 23a4fef9f72..e15010a291a 100644 --- a/lib/logger/test/logger/translator_test.exs +++ b/lib/logger/test/logger/translator_test.exs @@ -948,13 +948,13 @@ defmodule Logger.TranslatorTest do test "translates Supervisor progress" do {:ok, pid} = Supervisor.start_link([], strategy: :one_for_one) - assert capture_log(:info, fn -> + assert capture_log(:debug, fn -> ref = Process.monitor(pid) Supervisor.start_child(pid, worker(Task, [__MODULE__, :sleep, [self()]])) Process.exit(pid, :normal) receive do: ({:DOWN, ^ref, _, _, _} -> :ok) end) =~ ~r""" - \[info\] Child Task of Supervisor #PID<\d+\.\d+\.\d+> \(Supervisor\.Default\) started + \[(debug|info)\] Child Task of Supervisor #PID<\d+\.\d+\.\d+> \(Supervisor\.Default\) started Pid: #PID<\d+\.\d+\.\d+> Start Call: Task.start_link\(Logger.TranslatorTest, :sleep, \[#PID<\d+\.\d+\.\d+>\]\) """ @@ -963,36 +963,36 @@ defmodule Logger.TranslatorTest do test "translates Supervisor progress with name" do {:ok, pid} = Supervisor.start_link([], strategy: :one_for_one, name: __MODULE__) - assert capture_log(:info, fn -> + assert capture_log(:debug, fn -> ref = Process.monitor(pid) Supervisor.start_child(pid, worker(Task, [__MODULE__, :sleep, [self()]])) Process.exit(pid, :normal) receive do: ({:DOWN, ^ref, _, _, _} -> :ok) end) =~ ~r""" - \[info\] Child Task of Supervisor Logger.TranslatorTest started + \[(debug|info)\] Child Task of Supervisor Logger.TranslatorTest started """ {:ok, pid} = Supervisor.start_link([], strategy: :one_for_one, name: {:global, __MODULE__}) - assert capture_log(:info, fn -> + assert capture_log(:debug, fn -> ref = Process.monitor(pid) Supervisor.start_child(pid, worker(Task, [__MODULE__, :sleep, [self()]])) Process.exit(pid, :normal) receive do: ({:DOWN, ^ref, _, _, _} -> :ok) end) =~ ~r""" - \[info\] Child Task of Supervisor Logger.TranslatorTest started + \[(debug|info)\] Child Task of Supervisor Logger.TranslatorTest started """ {:ok, pid} = Supervisor.start_link([], strategy: :one_for_one, name: {:via, :global, __MODULE__}) - assert capture_log(:info, fn -> + assert capture_log(:debug, fn -> ref = Process.monitor(pid) Supervisor.start_child(pid, worker(Task, [__MODULE__, :sleep, [self()]])) Process.exit(pid, :normal) receive do: ({:DOWN, ^ref, _, _, _} -> :ok) end) =~ ~r""" - \[info\] Child Task of Supervisor Logger.TranslatorTest started + \[(debug|info)\] Child Task of Supervisor Logger.TranslatorTest started """ end