From 198cb331edeb32fcdcdfde7efb29e6d3eb53a7d7 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 16 May 2026 17:50:48 +0200 Subject: [PATCH] Fix flaky plex update test (#170911) --- tests/components/plex/test_update.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/components/plex/test_update.py b/tests/components/plex/test_update.py index dbdee5f9390..2e540e03d47 100644 --- a/tests/components/plex/test_update.py +++ b/tests/components/plex/test_update.py @@ -48,16 +48,16 @@ async def test_plex_update( # Failed updates requests_mock.get("/updater/status", status_code=500) async_fire_time_changed(hass, dt_util.utcnow() + UPDATER_SCAN_INTERVAL) - await hass.async_block_till_done() + await hass.async_block_till_done(wait_background_tasks=True) requests_mock.get("/updater/status", text=empty_payload) async_fire_time_changed(hass, dt_util.utcnow() + UPDATER_SCAN_INTERVAL) - await hass.async_block_till_done() + await hass.async_block_till_done(wait_background_tasks=True) # New release (not updatable) requests_mock.get("/updater/status", text=update_check_new_not_updatable) async_fire_time_changed(hass, dt_util.utcnow() + UPDATER_SCAN_INTERVAL) - await hass.async_block_till_done() + await hass.async_block_till_done(wait_background_tasks=True) assert hass.states.get(UPDATE_ENTITY).state == STATE_ON with pytest.raises(HomeAssistantError):