1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-23 04:19:34 +00:00
Files
core/tests/components/stream/conftest.py
Allen Porter 02a82d3f00 Add timeouts in stream tests to prevent possible hangs (#47545)
* Add timeouts on recving packets

Add a timeout when recving packets from the worker thread in case it hangs.
Add an exit condition just in case the while loop goes on forever.

* Add a timeout to recorder thread join.

* Wait for recorder thread to be invoked in tests

Remove the while loop and instead wait for segments to be produced by the background worker thread.

* Allow worker to resume before stopping to fix timeouts

* Lower test timeout further

* Remove test_stream_ended since it is flaky

This test doesn't really add additional value on top of other tests.
2021-03-13 01:53:26 -08:00

2.0 KiB