Avoid creating tasks for dependencies already being setup (#111034)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
parent
32cd3ad862
commit
2ef71289b9
4 changed files with 71 additions and 25 deletions
|
@ -926,7 +926,7 @@ async def test_bootstrap_dependencies(
|
|||
"""Assert the mqtt config entry was set up."""
|
||||
calls.append("mqtt")
|
||||
# assert the integration is not yet set up
|
||||
assertions.append(hass.data["setup_done"][integration].is_set() is False)
|
||||
assertions.append(hass.data["setup_done"][integration].done() is False)
|
||||
assertions.append(
|
||||
all(
|
||||
dependency in hass.config.components
|
||||
|
@ -942,7 +942,7 @@ async def test_bootstrap_dependencies(
|
|||
# assert mqtt was already set up
|
||||
assertions.append(
|
||||
"mqtt" not in hass.data["setup_done"]
|
||||
or hass.data["setup_done"]["mqtt"].is_set()
|
||||
or hass.data["setup_done"]["mqtt"].done()
|
||||
)
|
||||
assertions.append("mqtt" in hass.config.components)
|
||||
return True
|
||||
|
@ -1029,5 +1029,6 @@ async def test_bootstrap_dependencies(
|
|||
assert calls == ["mqtt", integration]
|
||||
|
||||
assert (
|
||||
f"Dependency {integration} will wait for dependencies ['mqtt']" in caplog.text
|
||||
f"Dependency {integration} will wait for dependencies dict_keys(['mqtt'])"
|
||||
in caplog.text
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue