mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 00:37:53 +00:00
Don't start test thread as daemon and wait until patching is done (#5494)
This commit is contained in:
parent
9442131373
commit
8217a42960
@ -45,7 +45,6 @@ def get_test_home_assistant():
|
||||
|
||||
hass = loop.run_until_complete(async_test_home_assistant(loop))
|
||||
|
||||
# FIXME should not be a daemon. Means hass.stop() not called in teardown
|
||||
stop_event = threading.Event()
|
||||
|
||||
def run_loop():
|
||||
@ -56,8 +55,6 @@ def get_test_home_assistant():
|
||||
loop.close()
|
||||
stop_event.set()
|
||||
|
||||
threading.Thread(name="LoopThread", target=run_loop, daemon=True).start()
|
||||
|
||||
orig_start = hass.start
|
||||
orig_stop = hass.stop
|
||||
|
||||
@ -76,6 +73,8 @@ def get_test_home_assistant():
|
||||
hass.start = start_hass
|
||||
hass.stop = stop_hass
|
||||
|
||||
threading.Thread(name="LoopThread", target=run_loop, daemon=False).start()
|
||||
|
||||
return hass
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user