mirror of https://github.com/MagicStack/uvloop.git
Longer test timeout (#497)
* Fix tests: 15s SSL_HANDSHAKE_TIMEOUT Also allow longer time for slow tests on qemu aarch64 for GitHub Actions * Build sdist on 22.04 to support LoongArch
This commit is contained in:
parent
598b16fd2b
commit
25b5f1e557
|
@ -44,7 +44,7 @@ jobs:
|
|||
|
||||
build-sdist:
|
||||
needs: validate-release-request
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
env:
|
||||
PIP_DISABLE_PIP_VERSION_CHECK: 1
|
||||
|
|
|
@ -165,7 +165,8 @@ class BaseTestDNS:
|
|||
|
||||
def test_getaddrinfo_19(self):
|
||||
# musl always returns ai_canonname while macOS never return for IPs,
|
||||
# but we strictly follow the docs to use the AI_CANONNAME flag
|
||||
# but we strictly follow the docs to use the AI_CANONNAME flag in a
|
||||
# shortcut __static_getaddrinfo_pyaddr()
|
||||
patch = self.implementation != 'asyncio'
|
||||
|
||||
self._test_getaddrinfo('::1', 80)
|
||||
|
@ -176,7 +177,8 @@ class BaseTestDNS:
|
|||
|
||||
def test_getaddrinfo_20(self):
|
||||
# musl always returns ai_canonname while macOS never return for IPs,
|
||||
# but we strictly follow the docs to use the AI_CANONNAME flag
|
||||
# but we strictly follow the docs to use the AI_CANONNAME flag in a
|
||||
# shortcut __static_getaddrinfo_pyaddr()
|
||||
patch = self.implementation != 'asyncio'
|
||||
|
||||
self._test_getaddrinfo('127.0.0.1', 80)
|
||||
|
|
|
@ -319,7 +319,8 @@ class _TestTCP:
|
|||
ValueError, 'ssl_handshake_timeout is only meaningful'):
|
||||
self.loop.run_until_complete(
|
||||
self.loop.create_server(
|
||||
lambda: None, host='::', port=0, ssl_handshake_timeout=10))
|
||||
lambda: None, host='::', port=0,
|
||||
ssl_handshake_timeout=SSL_HANDSHAKE_TIMEOUT))
|
||||
|
||||
def test_create_server_9(self):
|
||||
async def handle_client(reader, writer):
|
||||
|
@ -550,7 +551,8 @@ class _TestTCP:
|
|||
ValueError, 'ssl_handshake_timeout is only meaningful'):
|
||||
self.loop.run_until_complete(
|
||||
self.loop.create_connection(
|
||||
lambda: None, host='::', port=0, ssl_handshake_timeout=10))
|
||||
lambda: None, host='::', port=0,
|
||||
ssl_handshake_timeout=SSL_HANDSHAKE_TIMEOUT))
|
||||
|
||||
def test_transport_shutdown(self):
|
||||
CNT = 0 # number of clients that were successful
|
||||
|
@ -1224,7 +1226,7 @@ class _TestSSL(tb.SSLTestCase):
|
|||
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 = 10.0 # timeout for this test
|
||||
TIMEOUT = 20.0 # timeout for this test
|
||||
|
||||
A_DATA = b'A' * 1024 * 1024
|
||||
B_DATA = b'B' * 1024 * 1024
|
||||
|
@ -2038,7 +2040,7 @@ class _TestSSL(tb.SSLTestCase):
|
|||
|
||||
CNT = 0 # number of clients that were successful
|
||||
TOTAL_CNT = 25 # total number of clients that test will create
|
||||
TIMEOUT = 20.0 # timeout for this test
|
||||
TIMEOUT = 60.0 # timeout for this test
|
||||
|
||||
A_DATA = b'A' * 1024 * 1024
|
||||
B_DATA = b'B' * 1024 * 1024
|
||||
|
|
|
@ -10,6 +10,9 @@ import sys
|
|||
from uvloop import _testbase as tb
|
||||
|
||||
|
||||
SSL_HANDSHAKE_TIMEOUT = 15.0
|
||||
|
||||
|
||||
class _TestUnix:
|
||||
def test_create_unix_server_1(self):
|
||||
CNT = 0 # number of clients that were successful
|
||||
|
@ -160,7 +163,8 @@ class _TestUnix:
|
|||
ValueError, 'ssl_handshake_timeout is only meaningful'):
|
||||
self.loop.run_until_complete(
|
||||
self.loop.create_unix_server(
|
||||
lambda: None, path='/tmp/a', ssl_handshake_timeout=10))
|
||||
lambda: None, path='/tmp/a',
|
||||
ssl_handshake_timeout=SSL_HANDSHAKE_TIMEOUT))
|
||||
|
||||
def test_create_unix_server_existing_path_sock(self):
|
||||
with self.unix_sock_name() as path:
|
||||
|
@ -368,7 +372,8 @@ class _TestUnix:
|
|||
ValueError, 'ssl_handshake_timeout is only meaningful'):
|
||||
self.loop.run_until_complete(
|
||||
self.loop.create_unix_connection(
|
||||
lambda: None, path='/tmp/a', ssl_handshake_timeout=10))
|
||||
lambda: None, path='/tmp/a',
|
||||
ssl_handshake_timeout=SSL_HANDSHAKE_TIMEOUT))
|
||||
|
||||
|
||||
class Test_UV_Unix(_TestUnix, tb.UVTestCase):
|
||||
|
@ -567,7 +572,7 @@ class _TestSSL(tb.SSLTestCase):
|
|||
await fut
|
||||
|
||||
async def start_server():
|
||||
extras = dict(ssl_handshake_timeout=10.0)
|
||||
extras = dict(ssl_handshake_timeout=SSL_HANDSHAKE_TIMEOUT)
|
||||
|
||||
with tempfile.TemporaryDirectory() as td:
|
||||
sock_name = os.path.join(td, 'sock')
|
||||
|
@ -628,7 +633,7 @@ class _TestSSL(tb.SSLTestCase):
|
|||
sock.close()
|
||||
|
||||
async def client(addr):
|
||||
extras = dict(ssl_handshake_timeout=10.0)
|
||||
extras = dict(ssl_handshake_timeout=SSL_HANDSHAKE_TIMEOUT)
|
||||
|
||||
reader, writer = await asyncio.open_unix_connection(
|
||||
addr,
|
||||
|
|
Loading…
Reference in New Issue