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

This commit is contained in:
Paul Tarjan authored and GitHub committed 2025-12-10 16:38:34 +01:00
1 parent 4495a76557
commit d57801407b
1 file changed
+2 -1
+2 -1
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