]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-110167: Increase support.LOOPBACK_TIMEOUT to 10 seconds (#110413)
authorVictor Stinner <vstinner@python.org>
Thu, 5 Oct 2023 18:54:27 +0000 (20:54 +0200)
committerGitHub <noreply@github.com>
Thu, 5 Oct 2023 18:54:27 +0000 (20:54 +0200)
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.

Lib/test/libregrtest/setup.py
Lib/test/support/__init__.py

index cb410da5acb4c3057d3770e791f5b4ad67727f67..793347f60ad93c1bde8b199663a0d2fc5db7e741 100644 (file)
@@ -111,6 +111,8 @@ def setup_tests(runtests: RunTests):
     timeout = runtests.timeout
     if timeout is not None:
         # For a slow buildbot worker, increase SHORT_TIMEOUT and LONG_TIMEOUT
+        support.LOOPBACK_TIMEOUT = max(support.LOOPBACK_TIMEOUT, timeout / 120)
+        # don't increase INTERNET_TIMEOUT
         support.SHORT_TIMEOUT = max(support.SHORT_TIMEOUT, timeout / 40)
         support.LONG_TIMEOUT = max(support.LONG_TIMEOUT, timeout / 4)
 
index 900b9c96d08a6468755a2252e8617afdc0e50ce6..f3270d66bd085271339f6a8912bfd1c91d2078db 100644 (file)
@@ -75,13 +75,7 @@ __all__ = [
 #
 # The timeout should be long enough for connect(), recv() and send() methods
 # of socket.socket.
-LOOPBACK_TIMEOUT = 5.0
-if sys.platform == 'win32' and ' 32 bit (ARM)' in sys.version:
-    # bpo-37553: test_socket.SendfileUsingSendTest is taking longer than 2
-    # seconds on Windows ARM32 buildbot
-    LOOPBACK_TIMEOUT = 10
-elif sys.platform == 'vxworks':
-    LOOPBACK_TIMEOUT = 10
+LOOPBACK_TIMEOUT = 10.0
 
 # Timeout in seconds for network requests going to the internet. The timeout is
 # short enough to prevent a test to wait for too long if the internet request