diff --git a/tests/test_confserver.py b/tests/test_confserver.py index 6c8b8af..33e82d6 100644 --- a/tests/test_confserver.py +++ b/tests/test_confserver.py @@ -84,6 +84,7 @@ async def test_base(aiohttp_client): mqtt_helperbot.Client.disconnect() await mqtt_server.broker.shutdown() + await asyncio.sleep(0.1) bumper.xmpp_server.disconnect() @@ -121,7 +122,8 @@ async def test_restartService(aiohttp_client): assert resp.status == 200 mqtt_helperbot.Client.disconnect() - await mqtt_server.broker.shutdown() + await mqtt_server.broker.shutdown() + await asyncio.sleep(0.1) xmpp_server.disconnect() diff --git a/tests/test_mqttserver.py b/tests/test_mqttserver.py index 6cb9730..e05c5b4 100644 --- a/tests/test_mqttserver.py +++ b/tests/test_mqttserver.py @@ -154,6 +154,7 @@ async def test_helperbot_message(): mqtt_helperbot.Client.disconnect() await mqtt_server.broker.shutdown() + await asyncio.sleep(0.1) async def test_helperbot_expire_message(): @@ -220,6 +221,7 @@ async def test_helperbot_expire_message(): mqtt_helperbot.Client.disconnect() await mqtt_server.broker.shutdown() + await asyncio.sleep(0.1) async def test_helperbot_sendcommand(): @@ -368,6 +370,7 @@ async def test_helperbot_sendcommand(): mqtt_helperbot.Client.disconnect() await mqtt_server.broker.shutdown() + await asyncio.sleep(0.1) async def test_mqttserver(): @@ -604,6 +607,7 @@ async def test_passwordfile_opt_missing_mqttserver(): await mqtt_server.broker_coro() await mqtt_server.broker.shutdown() + await asyncio.sleep(0.1) except: pass