mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Clarify ConfigEntryNotReady log (#45425)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com> Co-authored-by: Charles Garwood <cgarwood@gmail.com>
This commit is contained in:
parent
198b875a6f
commit
86cd7911de
@ -246,7 +246,8 @@ class ConfigEntry:
|
||||
wait_time = 2 ** min(tries, 4) * 5
|
||||
tries += 1
|
||||
_LOGGER.warning(
|
||||
"Config entry for %s not ready yet. Retrying in %d seconds",
|
||||
"Config entry '%s' for %s integration not ready yet. Retrying in %d seconds",
|
||||
self.title,
|
||||
self.domain,
|
||||
wait_time,
|
||||
)
|
||||
|
@ -792,7 +792,7 @@ async def test_update_entry_options_and_trigger_listener(hass, manager):
|
||||
|
||||
async def test_setup_raise_not_ready(hass, caplog):
|
||||
"""Test a setup raising not ready."""
|
||||
entry = MockConfigEntry(domain="test")
|
||||
entry = MockConfigEntry(title="test_title", domain="test")
|
||||
|
||||
mock_setup_entry = AsyncMock(side_effect=ConfigEntryNotReady)
|
||||
mock_integration(hass, MockModule("test", async_setup_entry=mock_setup_entry))
|
||||
@ -802,7 +802,7 @@ async def test_setup_raise_not_ready(hass, caplog):
|
||||
await entry.async_setup(hass)
|
||||
|
||||
assert len(mock_call.mock_calls) == 1
|
||||
assert "Config entry for test not ready yet" in caplog.text
|
||||
assert "Config entry 'test_title' for test integration not ready yet" in caplog.text
|
||||
p_hass, p_wait_time, p_setup = mock_call.mock_calls[0][1]
|
||||
|
||||
assert p_hass is hass
|
||||
|
Loading…
x
Reference in New Issue
Block a user