Skip to content

Commit 0db2f14

Browse files
authored
gh-110167: Increase support.LOOPBACK_TIMEOUT to 10 seconds (#110413)
Increase support.LOOPBACK_TIMEOUT from 5 to 10 seconds. Also increase the timeout depending on the --timeout option. For example, for a test timeout of 40 minutes (ARM Raspbian 3.x), use LOOPBACK_TIMEOUT of 20 seconds instead of 5 seconds before.
1 parent 318f5df commit 0db2f14

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

Lib/test/libregrtest/setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ def setup_tests(runtests: RunTests):
111111
timeout = runtests.timeout
112112
if timeout is not None:
113113
# For a slow buildbot worker, increase SHORT_TIMEOUT and LONG_TIMEOUT
114+
support.LOOPBACK_TIMEOUT = max(support.LOOPBACK_TIMEOUT, timeout / 120)
115+
# don't increase INTERNET_TIMEOUT
114116
support.SHORT_TIMEOUT = max(support.SHORT_TIMEOUT, timeout / 40)
115117
support.LONG_TIMEOUT = max(support.LONG_TIMEOUT, timeout / 4)
116118

Lib/test/support/__init__.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,7 @@
7575
#
7676
# The timeout should be long enough for connect(), recv() and send() methods
7777
# of socket.socket.
78-
LOOPBACK_TIMEOUT = 5.0
79-
if sys.platform == 'win32' and ' 32 bit (ARM)' in sys.version:
80-
# bpo-37553: test_socket.SendfileUsingSendTest is taking longer than 2
81-
# seconds on Windows ARM32 buildbot
82-
LOOPBACK_TIMEOUT = 10
83-
elif sys.platform == 'vxworks':
84-
LOOPBACK_TIMEOUT = 10
78+
LOOPBACK_TIMEOUT = 10.0
8579

8680
# Timeout in seconds for network requests going to the internet. The timeout is
8781
# short enough to prevent a test to wait for too long if the internet request

0 commit comments

Comments
 (0)