From 553e7ff2b867d396ad03dbece86e9b60ce925320 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 13 Oct 2026 23:08:40 -0400 Subject: [PATCH] Fix flaky recorder test_commit_before_commits_pending_writes (#186342) Co-authored-by: Claude --- tests/components/recorder/test_init.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/components/recorder/test_init.py b/tests/components/recorder/test_init.py index 4c7d7671e5f2..41fedd1a5b1c 100644 --- a/tests/components/recorder/test_init.py +++ b/tests/components/recorder/test_init.py @@ -2727,10 +2727,7 @@ async def test_commit_before_commits_pending_writes( recorder.CONF_COMMIT_INTERVAL: 60, } - recorder_helper.async_initialize_recorder(hass) - hass.async_create_task(async_setup_recorder_instance(hass, config)) - await async_wait_recorder(hass) - instance = get_instance(hass) + instance = await async_setup_recorder_instance(hass, config) assert instance.commit_interval == 60 verify_states_in_queue_future = hass.loop.create_future() verify_session_commit_future = hass.loop.create_future()