From 913c15ad02af0441dcaaaa1e0d079e85cecb2cd7 Mon Sep 17 00:00:00 2001 From: Robert Resch Date: Fri, 11 Feb 2022 10:52:21 +0100 Subject: [PATCH] fix tests --- tests/test_init.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_init.py b/tests/test_init.py index 044fe2b..b9a57b7 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -53,9 +53,12 @@ async def test_start_stop_debug(): asyncio.create_task(b.start()) await asyncio.sleep(0.1) - asyncio.create_task(b.shutdown()) + while b.mqtt_server.broker.transitions.state == "starting": + await asyncio.sleep(0.1) l.check_present(("bumper", "INFO", "Starting Bumper")) l.clear() + + asyncio.create_task(b.shutdown()) await asyncio.sleep(0.1) l.check_present( ("bumper", "INFO", "Shutting down"), ("bumper", "INFO", "Shutdown complete")