1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-02 00:20:30 +01:00

Fix lingering tasks in update_coordinator test (#166968)

This commit is contained in:
Marc Mueller
2026-03-31 16:21:26 +02:00
committed by GitHub
parent daaa68ce22
commit a3f3b0bed4

View File

@@ -534,7 +534,7 @@ async def test_update_locks(
# Add subscriber
update_callback = Mock()
crd.async_add_listener(update_callback)
remove_callbacks = crd.async_add_listener(update_callback)
assert crd.update_interval
@@ -578,6 +578,10 @@ async def test_update_locks(
# Unblock queued update
block.set()
# Remove callbacks to avoid lingering timers
remove_callbacks()
await crd.async_shutdown()
async def test_refresh_recover(
crd: update_coordinator.DataUpdateCoordinator[int], caplog: pytest.LogCaptureFixture