mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
Remove logging of retrying config entry warning (#101483)
This commit is contained in:
parent
fe316f2233
commit
6853d54050
@ -437,17 +437,6 @@ class ConfigEntry:
|
|||||||
self._tries += 1
|
self._tries += 1
|
||||||
message = str(ex)
|
message = str(ex)
|
||||||
ready_message = f"ready yet: {message}" if message else "ready yet"
|
ready_message = f"ready yet: {message}" if message else "ready yet"
|
||||||
if self._tries == 1:
|
|
||||||
_LOGGER.warning(
|
|
||||||
(
|
|
||||||
"Config entry '%s' for %s integration not %s; Retrying in"
|
|
||||||
" background"
|
|
||||||
),
|
|
||||||
self.title,
|
|
||||||
self.domain,
|
|
||||||
ready_message,
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
(
|
(
|
||||||
"Config entry '%s' for %s integration not %s; Retrying in %d"
|
"Config entry '%s' for %s integration not %s; Retrying in %d"
|
||||||
|
@ -107,11 +107,11 @@ async def test_setup_configuration_failure(
|
|||||||
|
|
||||||
@pytest.mark.parametrize("subscriber_side_effect", [SubscriberException()])
|
@pytest.mark.parametrize("subscriber_side_effect", [SubscriberException()])
|
||||||
async def test_setup_susbcriber_failure(
|
async def test_setup_susbcriber_failure(
|
||||||
hass: HomeAssistant, warning_caplog, failing_subscriber, setup_base_platform
|
hass: HomeAssistant, caplog, failing_subscriber, setup_base_platform
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test configuration error."""
|
"""Test configuration error."""
|
||||||
await setup_base_platform()
|
await setup_base_platform()
|
||||||
assert "Subscriber error:" in warning_caplog.text
|
assert "Subscriber error:" in caplog.text
|
||||||
|
|
||||||
entries = hass.config_entries.async_entries(DOMAIN)
|
entries = hass.config_entries.async_entries(DOMAIN)
|
||||||
assert len(entries) == 1
|
assert len(entries) == 1
|
||||||
@ -119,7 +119,7 @@ async def test_setup_susbcriber_failure(
|
|||||||
|
|
||||||
|
|
||||||
async def test_setup_device_manager_failure(
|
async def test_setup_device_manager_failure(
|
||||||
hass: HomeAssistant, warning_caplog, setup_base_platform
|
hass: HomeAssistant, caplog, setup_base_platform
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test device manager api failure."""
|
"""Test device manager api failure."""
|
||||||
with patch(
|
with patch(
|
||||||
@ -130,7 +130,7 @@ async def test_setup_device_manager_failure(
|
|||||||
):
|
):
|
||||||
await setup_base_platform()
|
await setup_base_platform()
|
||||||
|
|
||||||
assert "Device manager error:" in warning_caplog.text
|
assert "Device manager error:" in caplog.text
|
||||||
|
|
||||||
entries = hass.config_entries.async_entries(DOMAIN)
|
entries = hass.config_entries.async_entries(DOMAIN)
|
||||||
assert len(entries) == 1
|
assert len(entries) == 1
|
||||||
|
@ -641,5 +641,5 @@ async def test_async_setup_retries_with_wrong_device(
|
|||||||
assert config_entry.state is ConfigEntryState.SETUP_RETRY
|
assert config_entry.state is ConfigEntryState.SETUP_RETRY
|
||||||
assert (
|
assert (
|
||||||
"Unexpected device found at 192.168.1.239; expected 0x0000000000999999, "
|
"Unexpected device found at 192.168.1.239; expected 0x0000000000999999, "
|
||||||
"found 0x000000000015243f; Retrying in background"
|
"found 0x000000000015243f; Retrying in"
|
||||||
) in caplog.text
|
) in caplog.text
|
||||||
|
Loading…
x
Reference in New Issue
Block a user