From 892901b4884c3b25e1ddd027ee12169ddf43e665 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 18 May 2026 22:47:04 -0500 Subject: [PATCH] fix debug replay test hang --- frigate/test/test_debug_replay.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frigate/test/test_debug_replay.py b/frigate/test/test_debug_replay.py index e7f9df42db..a91f759c44 100644 --- a/frigate/test/test_debug_replay.py +++ b/frigate/test/test_debug_replay.py @@ -71,6 +71,14 @@ class TestDebugReplayManagerSession(unittest.TestCase): class TestDebugReplayManagerStop(unittest.TestCase): + def setUp(self) -> None: + # stop() publishes a terminal job_state via a real JobStatePublisher, + # which opens a ZMQ REQ socket and blocks on REP. No dispatcher runs + # in unit tests, so substitute a no-op publisher. + patcher = patch("frigate.debug_replay.JobStatePublisher") + patcher.start() + self.addCleanup(patcher.stop) + def test_stop_when_inactive_is_a_noop(self) -> None: from frigate.debug_replay import DebugReplayManager