Disable the aiohttp total timeout on the panel SSE stream (task 6c4b0fa4)
Home Assistant's shared session defaults to ClientTimeout(total=300), which cut a healthy event stream every five minutes; transitions fired during the reconnect window are not replayed. The stream request now passes ClientTimeout(total=None, sock_connect=<client timeout>), with aiohttp imported lazily so the client stays importable without it. Tests run the stream path against a stand-in aiohttp module fixture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,10 @@ from custom_components.nestquest.api_client import (
|
||||
)
|
||||
from custom_components.nestquest.sse import NestQuestEventStream
|
||||
|
||||
# ``stream_events`` imports aiohttp lazily; the harness has none, so
|
||||
# every test here runs with the stand-in module installed.
|
||||
pytestmark = pytest.mark.usefixtures("fake_aiohttp")
|
||||
|
||||
BASE_URL = "http://api.test:8000"
|
||||
TOKEN = "test-panel-token"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user