]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-90978: test_ssl of test_asyncio uses LONG_TIMEOUT (#92402)
authorVictor Stinner <vstinner@python.org>
Fri, 6 May 2022 14:18:56 +0000 (16:18 +0200)
committerGitHub <noreply@github.com>
Fri, 6 May 2022 14:18:56 +0000 (15:18 +0100)
On slow buildbot workers, some test_ssl tests fail randomly because
of short timeout (30 seconds). Use support.LONG_TIMEOUT instead which
is longer and also adjusted (by regrtest --timeout option) on
buildbot workers known to be slow.

Lib/test/test_asyncio/test_ssl.py

index 67684ab09e688717a5106fca35b7c4002be908ef..9ba6ba04b32b8ea13bf91d4a47c51bab324a0b42 100644 (file)
@@ -62,7 +62,7 @@ class MyBaseProto(asyncio.Protocol):
 class TestSSL(test_utils.TestCase):
 
     PAYLOAD_SIZE = 1024 * 100
-    TIMEOUT = 60
+    TIMEOUT = support.LONG_TIMEOUT
 
     def setUp(self):
         super().setUp()
@@ -179,7 +179,7 @@ class TestSSL(test_utils.TestCase):
     def test_create_server_ssl_1(self):
         CNT = 0           # number of clients that were successful
         TOTAL_CNT = 25    # total number of clients that test will create
-        TIMEOUT = 60.0    # timeout for this test
+        TIMEOUT = support.LONG_TIMEOUT  # timeout for this test
 
         A_DATA = b'A' * 1024 * 1024
         B_DATA = b'B' * 1024 * 1024
@@ -1019,7 +1019,7 @@ class TestSSL(test_utils.TestCase):
     def test_create_server_ssl_over_ssl(self):
         CNT = 0           # number of clients that were successful
         TOTAL_CNT = 25    # total number of clients that test will create
-        TIMEOUT = 30.0    # timeout for this test
+        TIMEOUT = support.LONG_TIMEOUT  # timeout for this test
 
         A_DATA = b'A' * 1024 * 1024
         B_DATA = b'B' * 1024 * 1024