Skip to content

Commit

Permalink
[matter_yamltests] Increase the keep alive timeout for websockets (#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple authored and pull[bot] committed Jan 20, 2024
1 parent 65e08d9 commit 1944114
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
from .hooks import WebSocketRunnerHooks
from .runner import TestRunner

_KEEP_ALIVE_TIMEOUT_IN_SECONDS = 40


@dataclass
class WebSocketRunnerConfig:
Expand Down Expand Up @@ -65,7 +67,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)
connection = await websockets.connect(url, ping_timeout=_KEEP_ALIVE_TIMEOUT_IN_SECONDS)
duration = round((time.time() - start) * 1000, 0)
self._hooks.success(duration)
return connection
Expand Down

0 comments on commit 1944114

Please sign in to comment.