Modify wait timeout in stream (#42794)

* Set wait timeout to 40

* Use dynamic wait_timeout

* Catch error in container open

* Get restart times from const.py

* Fix test_stream_keepalive
This commit is contained in:
uvjustin 2020-11-12 01:32:56 +08:00 committed by GitHub
parent f4f3192a6a
commit 66dccd86bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 4 deletions

View file

@ -147,7 +147,9 @@ async def test_stream_keepalive(hass):
with patch("av.open") as av_open, patch(
"homeassistant.components.stream.worker.time"
) as mock_time:
) as mock_time, patch(
"homeassistant.components.stream.worker.STREAM_RESTART_INCREMENT", 0
):
av_open.side_effect = av.error.InvalidDataError(-2, "error")
mock_time.time.side_effect = time_side_effect
# Request stream