Skip to content

Commit 1098186

Browse files
vivien-applepull[bot]
authored andcommitted
[matter_yamltests] Increase the maximum message size that can be received by the websocket (#27005)
1 parent b19f03e commit 1098186

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/py_matter_yamltests/matter_yamltests/websocket_runner.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from .runner import TestRunner
2424

2525
_KEEP_ALIVE_TIMEOUT_IN_SECONDS = 40
26+
_MAX_MESSAGE_SIZE_IN_BYTES = 10485760 # 10 MB
2627

2728

2829
@dataclass
@@ -67,7 +68,7 @@ async def _start_client(self, url, max_retries=4, interval_between_retries=1):
6768
start = time.time()
6869
try:
6970
self._hooks.connecting(url)
70-
connection = await websockets.connect(url, ping_timeout=_KEEP_ALIVE_TIMEOUT_IN_SECONDS)
71+
connection = await websockets.connect(url, ping_timeout=_KEEP_ALIVE_TIMEOUT_IN_SECONDS, max_size=_MAX_MESSAGE_SIZE_IN_BYTES)
7172
duration = round((time.time() - start) * 1000, 0)
7273
self._hooks.success(duration)
7374
return connection

0 commit comments

Comments
 (0)