Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import time
from typing import (
Any,
Final,
Optional,
Dict,
cast,
Expand All @@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe use 50.0 float literal


# See lldbtest.Base.spawnSubprocess, which should help ensure any processes
# created by the DAP client are terminated correctly when the test ends.
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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(
Expand Down
Loading