From 895dbc00480d930de01b6973daaaa04cdcb15056 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 30 May 2023 12:24:40 +0200 Subject: [PATCH] [matter_yamltests] Increase the maximum message size that can be received by the websocket --- .../py_matter_yamltests/matter_yamltests/websocket_runner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/py_matter_yamltests/matter_yamltests/websocket_runner.py b/scripts/py_matter_yamltests/matter_yamltests/websocket_runner.py index 9a40ec5977e5a4..f32968debfacfc 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/websocket_runner.py +++ b/scripts/py_matter_yamltests/matter_yamltests/websocket_runner.py @@ -23,6 +23,7 @@ from .runner import TestRunner _KEEP_ALIVE_TIMEOUT_IN_SECONDS = 40 +_MAX_MESSAGE_SIZE_IN_BYTES = 10485760 # 10 MB @dataclass @@ -67,7 +68,7 @@ async def _start_client(self, url, max_retries=4, interval_between_retries=1): start = time.time() try: self._hooks.connecting(url) - connection = await websockets.connect(url, ping_timeout=_KEEP_ALIVE_TIMEOUT_IN_SECONDS) + connection = await websockets.connect(url, ping_timeout=_KEEP_ALIVE_TIMEOUT_IN_SECONDS, max_size=_MAX_MESSAGE_SIZE_IN_BYTES) duration = round((time.time() - start) * 1000, 0) self._hooks.success(duration) return connection