Replace asyncio.wait with asyncio.gather since wait ignores exceptions (#33380)
* replace asyncio.wait with asyncio.gather since wait ignores exceptions fix for test_entity_platform so it expects the exception * changed to log on failed domains * discovered that this fix actually removes other uncaught exceptions * fix in the list of ignored exceptions * replaced a few ignores on dyson tests that work locally but fail in the CI * two more tests that are failing on the CI and not locally * removed assertion on multiple entries with same unique_id - replaced with log and return reverted test_entity_platform to its original since now there is no exception thrown * entered all the dyson tests. they all pass locally and probabilistically fail in the CI * removed unnecessary str() for exception * added log message for duplicate entity_id / unique_id * removed log in case of False return value * added exc_info * change the use of exc_info
This commit is contained in:
5 files changed
+32
-54
No files matched your search
@@ -128,7 +128,7 @@ class EntityComponent:
|
||||
tasks.append(self.async_setup_platform(p_type, p_config))
|
||||
|
||||
if tasks:
|
||||
await asyncio.wait(tasks)
|
||||
await asyncio.gather(*tasks)
|
||||
|
||||
# Generic discovery listener for loading platform dynamically
|
||||
# Refer to: homeassistant.components.discovery.load_platform()
|
||||
@@ -263,7 +263,7 @@ class EntityComponent:
|
||||
tasks.append(platform.async_destroy())
|
||||
|
||||
if tasks:
|
||||
await asyncio.wait(tasks)
|
||||
await asyncio.gather(*tasks)
|
||||
|
||||
self._platforms = {self.domain: self._platforms[self.domain]}
|
||||
self.config = None
|
||||
|
||||
Reference in new issue
Block a user