mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 12:15:08 +02:00
Downgrade slow domain setup warning
This commit is contained in:
@@ -182,7 +182,7 @@ def _async_setup_component(hass: core.HomeAssistant,
|
|||||||
start = timer()
|
start = timer()
|
||||||
_LOGGER.info("Setting up %s", domain)
|
_LOGGER.info("Setting up %s", domain)
|
||||||
warn_task = hass.loop.call_later(
|
warn_task = hass.loop.call_later(
|
||||||
SLOW_SETUP_WARNING, _LOGGER.warning,
|
SLOW_SETUP_WARNING, _LOGGER.info,
|
||||||
"Setup of %s is taking over %s seconds.", domain, SLOW_SETUP_WARNING)
|
"Setup of %s is taking over %s seconds.", domain, SLOW_SETUP_WARNING)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@@ -461,6 +461,6 @@ def test_component_warn_slow_setup(hass):
|
|||||||
timeout, logger_method = mock_call.mock_calls[0][1][:2]
|
timeout, logger_method = mock_call.mock_calls[0][1][:2]
|
||||||
|
|
||||||
assert timeout == setup.SLOW_SETUP_WARNING
|
assert timeout == setup.SLOW_SETUP_WARNING
|
||||||
assert logger_method == setup._LOGGER.warning
|
assert logger_method == setup._LOGGER.info
|
||||||
|
|
||||||
assert mock_call().cancel.called
|
assert mock_call().cancel.called
|
||||||
|
Reference in New Issue
Block a user