mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
gh-95573: Reduce test data size in test_asyncio/test_ssl.py (GH-95668) (GH-95705)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 3a9e1fda7a
)
Co-authored-by: Fantix King <fantix.king@gmail.com>
This commit is contained in:
parent
6a36b8e586
commit
954b8875a0
2 changed files with 18 additions and 7 deletions
|
@ -5,6 +5,7 @@ import gc
|
|||
import logging
|
||||
import select
|
||||
import socket
|
||||
import sys
|
||||
import tempfile
|
||||
import threading
|
||||
import time
|
||||
|
@ -20,6 +21,10 @@ from test import support
|
|||
from test.test_asyncio import utils as test_utils
|
||||
|
||||
|
||||
MACOS = (sys.platform == 'darwin')
|
||||
BUF_MULTIPLIER = 1024 if not MACOS else 64
|
||||
|
||||
|
||||
def tearDownModule():
|
||||
asyncio.set_event_loop_policy(None)
|
||||
|
||||
|
@ -191,8 +196,8 @@ class TestSSL(test_utils.TestCase):
|
|||
TOTAL_CNT = 25 # total number of clients that test will create
|
||||
TIMEOUT = support.LONG_TIMEOUT # timeout for this test
|
||||
|
||||
A_DATA = b'A' * 1024 * 1024
|
||||
B_DATA = b'B' * 1024 * 1024
|
||||
A_DATA = b'A' * 1024 * BUF_MULTIPLIER
|
||||
B_DATA = b'B' * 1024 * BUF_MULTIPLIER
|
||||
|
||||
sslctx = self._create_server_ssl_context(
|
||||
test_utils.ONLYCERT, test_utils.ONLYKEY
|
||||
|
@ -287,8 +292,8 @@ class TestSSL(test_utils.TestCase):
|
|||
CNT = 0
|
||||
TOTAL_CNT = 25
|
||||
|
||||
A_DATA = b'A' * 1024 * 1024
|
||||
B_DATA = b'B' * 1024 * 1024
|
||||
A_DATA = b'A' * 1024 * BUF_MULTIPLIER
|
||||
B_DATA = b'B' * 1024 * BUF_MULTIPLIER
|
||||
|
||||
sslctx = self._create_server_ssl_context(
|
||||
test_utils.ONLYCERT,
|
||||
|
@ -1034,8 +1039,8 @@ class TestSSL(test_utils.TestCase):
|
|||
TOTAL_CNT = 25 # total number of clients that test will create
|
||||
TIMEOUT = support.LONG_TIMEOUT # timeout for this test
|
||||
|
||||
A_DATA = b'A' * 1024 * 1024
|
||||
B_DATA = b'B' * 1024 * 1024
|
||||
A_DATA = b'A' * 1024 * BUF_MULTIPLIER
|
||||
B_DATA = b'B' * 1024 * BUF_MULTIPLIER
|
||||
|
||||
sslctx_1 = self._create_server_ssl_context(
|
||||
test_utils.ONLYCERT, test_utils.ONLYKEY)
|
||||
|
@ -1178,7 +1183,7 @@ class TestSSL(test_utils.TestCase):
|
|||
CNT = 0
|
||||
TOTAL_CNT = 25
|
||||
|
||||
A_DATA = b'A' * 1024 * 1024
|
||||
A_DATA = b'A' * 1024 * BUF_MULTIPLIER
|
||||
|
||||
sslctx = self._create_server_ssl_context(
|
||||
test_utils.ONLYCERT, test_utils.ONLYKEY)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue