|
5 | 5 | import logging
|
6 | 6 | import select
|
7 | 7 | import socket
|
| 8 | +import sys |
8 | 9 | import tempfile
|
9 | 10 | import threading
|
10 | 11 | import time
|
|
20 | 21 | from test.test_asyncio import utils as test_utils
|
21 | 22 |
|
22 | 23 |
|
| 24 | +MACOS = (sys.platform == 'darwin') |
| 25 | +BUF_MULTIPLIER = 1024 if not MACOS else 64 |
| 26 | + |
| 27 | + |
23 | 28 | def tearDownModule():
|
24 | 29 | asyncio.set_event_loop_policy(None)
|
25 | 30 |
|
@@ -191,8 +196,8 @@ def test_create_server_ssl_1(self):
|
191 | 196 | TOTAL_CNT = 25 # total number of clients that test will create
|
192 | 197 | TIMEOUT = support.LONG_TIMEOUT # timeout for this test
|
193 | 198 |
|
194 |
| - A_DATA = b'A' * 1024 * 1024 |
195 |
| - B_DATA = b'B' * 1024 * 1024 |
| 199 | + A_DATA = b'A' * 1024 * BUF_MULTIPLIER |
| 200 | + B_DATA = b'B' * 1024 * BUF_MULTIPLIER |
196 | 201 |
|
197 | 202 | sslctx = self._create_server_ssl_context(
|
198 | 203 | test_utils.ONLYCERT, test_utils.ONLYKEY
|
@@ -287,8 +292,8 @@ def test_create_connection_ssl_1(self):
|
287 | 292 | CNT = 0
|
288 | 293 | TOTAL_CNT = 25
|
289 | 294 |
|
290 |
| - A_DATA = b'A' * 1024 * 1024 |
291 |
| - B_DATA = b'B' * 1024 * 1024 |
| 295 | + A_DATA = b'A' * 1024 * BUF_MULTIPLIER |
| 296 | + B_DATA = b'B' * 1024 * BUF_MULTIPLIER |
292 | 297 |
|
293 | 298 | sslctx = self._create_server_ssl_context(
|
294 | 299 | test_utils.ONLYCERT,
|
@@ -1034,8 +1039,8 @@ def test_create_server_ssl_over_ssl(self):
|
1034 | 1039 | TOTAL_CNT = 25 # total number of clients that test will create
|
1035 | 1040 | TIMEOUT = support.LONG_TIMEOUT # timeout for this test
|
1036 | 1041 |
|
1037 |
| - A_DATA = b'A' * 1024 * 1024 |
1038 |
| - B_DATA = b'B' * 1024 * 1024 |
| 1042 | + A_DATA = b'A' * 1024 * BUF_MULTIPLIER |
| 1043 | + B_DATA = b'B' * 1024 * BUF_MULTIPLIER |
1039 | 1044 |
|
1040 | 1045 | sslctx_1 = self._create_server_ssl_context(
|
1041 | 1046 | test_utils.ONLYCERT, test_utils.ONLYKEY)
|
@@ -1178,7 +1183,7 @@ def test_shutdown_cleanly(self):
|
1178 | 1183 | CNT = 0
|
1179 | 1184 | TOTAL_CNT = 25
|
1180 | 1185 |
|
1181 |
| - A_DATA = b'A' * 1024 * 1024 |
| 1186 | + A_DATA = b'A' * 1024 * BUF_MULTIPLIER |
1182 | 1187 |
|
1183 | 1188 | sslctx = self._create_server_ssl_context(
|
1184 | 1189 | test_utils.ONLYCERT, test_utils.ONLYKEY)
|
|
0 commit comments