mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +00:00
Use async_create_task in recorder init tests (#113586)
This commit is contained in:
parent
d17e397455
commit
ef0c17749f
@ -142,7 +142,7 @@ async def test_shutdown_before_startup_finishes(
|
||||
hass.set_state(CoreState.not_running)
|
||||
|
||||
recorder_helper.async_initialize_recorder(hass)
|
||||
hass.create_task(async_setup_recorder_instance(hass, config))
|
||||
hass.async_create_task(async_setup_recorder_instance(hass, config))
|
||||
await recorder_helper.async_wait_recorder(hass)
|
||||
instance = get_instance(hass)
|
||||
|
||||
@ -172,7 +172,7 @@ async def test_canceled_before_startup_finishes(
|
||||
"""Test recorder shuts down when its startup future is canceled out from under it."""
|
||||
hass.set_state(CoreState.not_running)
|
||||
recorder_helper.async_initialize_recorder(hass)
|
||||
hass.create_task(async_setup_recorder_instance(hass))
|
||||
hass.async_create_task(async_setup_recorder_instance(hass))
|
||||
await recorder_helper.async_wait_recorder(hass)
|
||||
|
||||
instance = get_instance(hass)
|
||||
@ -224,7 +224,7 @@ async def test_state_gets_saved_when_set_before_start_event(
|
||||
hass.set_state(CoreState.not_running)
|
||||
|
||||
recorder_helper.async_initialize_recorder(hass)
|
||||
hass.create_task(async_setup_recorder_instance(hass))
|
||||
hass.async_create_task(async_setup_recorder_instance(hass))
|
||||
await recorder_helper.async_wait_recorder(hass)
|
||||
|
||||
entity_id = "test.recorder"
|
||||
@ -2509,7 +2509,7 @@ async def test_commit_before_commits_pending_writes(
|
||||
}
|
||||
|
||||
recorder_helper.async_initialize_recorder(hass)
|
||||
hass.create_task(async_setup_recorder_instance(hass, config))
|
||||
hass.async_create_task(async_setup_recorder_instance(hass, config))
|
||||
await recorder_helper.async_wait_recorder(hass)
|
||||
instance = get_instance(hass)
|
||||
assert instance.commit_interval == 60
|
||||
|
Loading…
x
Reference in New Issue
Block a user