Ensure dependencies are awaited correctly when setting up integrations (#91454)
* Do not wait * Correct tests * Manage after dependencies stage 1 * test bootstrap dependencies * Assert log the dependenciy is waited for * Improve docstrings * Assert outside callback * Patch async_get_integrations * Revert changes made to snips integration * Undo changes to mqtt_statestream
This commit is contained in:
parent
2e18b37291
commit
da26b0a930
3 changed files with 139 additions and 3 deletions
|
@ -629,6 +629,9 @@ async def _async_set_up_integrations(
|
|||
- stage_1_domains
|
||||
)
|
||||
|
||||
# Enables after dependencies when setting up stage 1 domains
|
||||
async_set_domains_to_be_loaded(hass, stage_1_domains)
|
||||
|
||||
# Start setup
|
||||
if stage_1_domains:
|
||||
_LOGGER.info("Setting up stage 1: %s", stage_1_domains)
|
||||
|
@ -640,7 +643,7 @@ async def _async_set_up_integrations(
|
|||
except asyncio.TimeoutError:
|
||||
_LOGGER.warning("Setup timed out for stage 1 - moving forward")
|
||||
|
||||
# Enables after dependencies
|
||||
# Add after dependencies when setting up stage 2 domains
|
||||
async_set_domains_to_be_loaded(hass, stage_2_domains)
|
||||
|
||||
if stage_2_domains:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue