From 167ad996d7b1db7b254613fe8afdd1ca99eba745 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Tue, 4 Aug 2026 17:50:24 -0500 Subject: [PATCH] fix: suppress NARR stub noise and sandbox-cleanup Holder shutdown logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add default NarrClient 404 stub to DataCase so incidental inline NarrFetchWorker execution doesn't log 500 errors in unrelated tests. Add DBConnection.Holder to the sandbox-cleanup noise suppression list — same benign 'owner exited' category as the already-suppressed Postgrex.Protocol and DBConnection.Connection. --- test/support/data_case.ex | 4 ++++ test/test_helper.exs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/test/support/data_case.ex b/test/support/data_case.ex index ac75cf3c..bbbf7bc4 100644 --- a/test/support/data_case.ex +++ b/test/support/data_case.ex @@ -54,6 +54,10 @@ defmodule Microwaveprop.DataCase do Plug.Conn.send_resp(conn, 404, "not found") end) + Req.Test.stub(Microwaveprop.Weather.NarrClient, fn conn -> + Plug.Conn.send_resp(conn, 404, "not found") + end) + :ok end diff --git a/test/test_helper.exs b/test/test_helper.exs index 54561b69..372cc7b1 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -55,7 +55,7 @@ Application.ensure_all_started(:stream_data) # captures logs from the test process). Pinning these modules to # :critical drops the noise without affecting real DB error logging. Logger.put_module_level( - [Postgrex.Protocol, DBConnection.Connection], + [Postgrex.Protocol, DBConnection.Connection, DBConnection.Holder], :critical )