Hold a lock to prevent concurrent setup of config entries (#116482)

This commit is contained in:
J. Nick Koston
2024-04-30 18:47:12 -05:00
committed by GitHub
parent 3c7cbf5794
commit 6cf1c5c1f2
7 changed files with 129 additions and 18 deletions

View File

@ -1873,6 +1873,7 @@ async def test_reload_entry_with_restored_subscriptions(
# Setup the MQTT entry
entry = MockConfigEntry(domain=mqtt.DOMAIN, data={mqtt.CONF_BROKER: "test-broker"})
entry.add_to_hass(hass)
hass.config.components.add(mqtt.DOMAIN)
mqtt_client_mock.connect.return_value = 0
with patch("homeassistant.config.load_yaml_config_file", return_value={}):
await entry.async_setup(hass)