File 0001-Fix-logger-translator-tests-under-Erlang-27.1-13839.patch of Package elixir

From 7a6b35422c58d44bdb925ac7f39264885f977ee0 Mon Sep 17 00:00:00 2001
From: Igor Goryachev <148483957+delitrem@users.noreply.github.com>
Date: Thu, 19 Sep 2024 13:57:48 +0300
Subject: [PATCH] Fix logger translator tests under Erlang 27.1 (#13839)

---
 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 23a4fef9f..e15010a29 100644
--- a/lib/logger/test/logger/translator_test.exs
+++ b/lib/logger/test/logger/translator_test.exs
@@ -948,13 +948,13 @@ test "translates :proc_lib crashes with neighbour with name" 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 @@ test "translates Supervisor progress" 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
 
-- 
2.43.0

openSUSE Build Service is sponsored by