From 2efef72ec2806e98db328f7c175994debe4bdbd3 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 5 Nov 2023 16:47:55 +0100 Subject: [PATCH] Reduce wait for ws test --- tests/rpc/test_rpc_apiserver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/rpc/test_rpc_apiserver.py b/tests/rpc/test_rpc_apiserver.py index 46fead3bc..4b2866c16 100644 --- a/tests/rpc/test_rpc_apiserver.py +++ b/tests/rpc/test_rpc_apiserver.py @@ -2194,14 +2194,14 @@ def test_api_ws_subscribe(botclient, mocker): with client.websocket_connect(ws_url) as ws: ws.send_json({'type': 'subscribe', 'data': ['whitelist']}) - time.sleep(1) + time.sleep(0.2) # Check call count is now 1 as we sent a valid subscribe request assert sub_mock.call_count == 1 with client.websocket_connect(ws_url) as ws: ws.send_json({'type': 'subscribe', 'data': 'whitelist'}) - time.sleep(1) + time.sleep(0.2) # Call count hasn't changed as the subscribe request was invalid assert sub_mock.call_count == 1