From d784125ae9ca83b0b3494f78724ace76d0a1f308 Mon Sep 17 00:00:00 2001 From: Ebuka Ezike Date: Fri, 5 Dec 2025 12:35:08 +0000 Subject: [PATCH] [lldb-dap] increate DAP default timeout --- .../Python/lldbsuite/test/tools/lldb-dap/dap_server.py | 5 +++-- .../Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py index 7a9d5a82983d7..7c95cc3d87f56 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py @@ -15,6 +15,7 @@ import time from typing import ( Any, + Final, Optional, Dict, cast, @@ -30,7 +31,7 @@ # set timeout based on whether ASAN was enabled or not. Increase # timeout by a factor of 10 if ASAN is enabled. -DEFAULT_TIMEOUT = 10 * (10 if ("ASAN_OPTIONS" in os.environ) else 1) +DEFAULT_TIMEOUT: Final[float] = 50 * (10 if ("ASAN_OPTIONS" in os.environ) else 1) # See lldbtest.Base.spawnSubprocess, which should help ensure any processes # created by the DAP client are terminated correctly when the test ends. @@ -348,7 +349,7 @@ def _recv_packet( self, *, predicate: Optional[Callable[[ProtocolMessage], bool]] = None, - timeout: Optional[float] = DEFAULT_TIMEOUT, + timeout: float = DEFAULT_TIMEOUT, ) -> Optional[ProtocolMessage]: """Processes received packets from the adapter. Updates the DebugCommunication stateful properties based on the received diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py index c7d302cc2dea2..fa8b1b7ab6426 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py @@ -1,6 +1,6 @@ import os import time -from typing import Optional, Callable, Any, List, Union +from typing import Optional, Callable, Any, List, Union, Final import uuid import dap_server @@ -18,7 +18,7 @@ class DAPTestCaseBase(TestBase): # set timeout based on whether ASAN was enabled or not. Increase # timeout by a factor of 10 if ASAN is enabled. - DEFAULT_TIMEOUT = dap_server.DEFAULT_TIMEOUT + DEFAULT_TIMEOUT: Final[float] = dap_server.DEFAULT_TIMEOUT NO_DEBUG_INFO_TESTCASE = True def create_debug_adapter(