Fix Non-thread-safe operation in wemo tests (#62418)

This commit is contained in:
Eric Severance 2021-12-20 10:56:56 -08:00 committed by GitHub
parent 168fefad88
commit 2dfd4c49da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,7 @@ async def _async_multiple_call_helper(hass, pywemo_device, call1, call2):
return
nonlocal call_count
call_count += 1
hass.add_job(waiting.set)
hass.loop.call_soon_threadsafe(waiting.set)
event.wait()
# Danger! Do not use a Mock side_effect here. The test will deadlock. When