mirror of
https://github.com/home-assistant/core.git
synced 2025-08-01 03:35:09 +02:00
Fix flakey cast discovery stop test (#114605)
https://github.com/home-assistant/core/actions/runs/8515215623/job/23322322954?pr=114602
This commit is contained in:
@@ -453,13 +453,13 @@ async def test_stop_discovery_called_on_stop(
|
||||
"""Test pychromecast.stop_discovery called on shutdown."""
|
||||
# start_discovery should be called with empty config
|
||||
await async_setup_cast(hass, {})
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
assert castbrowser_mock.return_value.start_discovery.call_count == 1
|
||||
|
||||
# stop discovery should be called on shutdown
|
||||
hass.bus.async_fire(EVENT_HOMEASSISTANT_STOP)
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
assert castbrowser_mock.return_value.stop_discovery.call_count == 1
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user