Skip to content

Commit

Permalink
Reduce MS for situations with performance penalties.
Browse files Browse the repository at this point in the history
Nowadays it's tuned with WEBSOCKETS_TESTS_TIMEOUT_FACTOR.
  • Loading branch information
aaugustin committed Aug 7, 2024
1 parent d2120de commit efd03d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@

# PyPy has a performance penalty for this test suite.
if platform.python_implementation() == "PyPy": # pragma: no cover
MS *= 5
MS *= 2

# asyncio's debug mode has a 10x performance penalty for this test suite.
# asyncio's debug mode has a performance penalty for this test suite.
if os.environ.get("PYTHONASYNCIODEBUG"): # pragma: no cover
MS *= 10
MS *= 2

# Ensure that timeouts are larger than the clock's resolution (for Windows).
MS = max(MS, 2.5 * time.get_clock_info("monotonic").resolution)
Expand Down

0 comments on commit efd03d8

Please sign in to comment.