1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-15 07:36:16 +00:00

Fix flaky test_calls_not_allowed by using thread-safe event signaling (#158504)

This commit is contained in:
Paul Tarjan
2025-12-10 08:38:34 -07:00
committed by GitHub
parent 4495a76557
commit d57801407b

View File

@@ -115,7 +115,8 @@ async def test_calls_not_allowed(
# Should be problem.pcm from components/voip
played_audio_bytes = audio_bytes
done.set()
# Use call_soon_threadsafe because send_audio runs in an executor thread
hass.loop.call_soon_threadsafe(done.set)
protocol.transport = Mock()
protocol.loop_delay = 0