Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cpython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sip
Cpython
Commits
3a9e1fda
Unverified
Commit
3a9e1fda
authored
Aug 5, 2022
by
Fantix King
Committed by
GitHub
Aug 5, 2022
Browse files
Options
Downloads
Patches
Plain Diff
gh-95573: Reduce test data size in test_asyncio/test_ssl.py (GH-95668)
Co-authored-by:
Łukasz Langa
<
lukasz@langa.pl
>
parent
a525f2ad
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Lib/test/test_asyncio/test_ssl.py
+12
-7
12 additions, 7 deletions
Lib/test/test_asyncio/test_ssl.py
Misc/NEWS.d/next/Tests/2022-08-05-09-57-43.gh-issue-95573.edMdQB.rst
+6
-0
6 additions, 0 deletions
.../next/Tests/2022-08-05-09-57-43.gh-issue-95573.edMdQB.rst
with
18 additions
and
7 deletions
Lib/test/test_asyncio/test_ssl.py
+
12
−
7
View file @
3a9e1fda
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
import
logging
import
logging
import
select
import
select
import
socket
import
socket
import
sys
import
tempfile
import
tempfile
import
threading
import
threading
import
time
import
time
...
@@ -20,6 +21,10 @@
...
@@ -20,6 +21,10 @@
from
test.test_asyncio
import
utils
as
test_utils
from
test.test_asyncio
import
utils
as
test_utils
MACOS
=
(
sys
.
platform
==
'
darwin
'
)
BUF_MULTIPLIER
=
1024
if
not
MACOS
else
64
def
tearDownModule
():
def
tearDownModule
():
asyncio
.
set_event_loop_policy
(
None
)
asyncio
.
set_event_loop_policy
(
None
)
...
@@ -191,8 +196,8 @@ def test_create_server_ssl_1(self):
...
@@ -191,8 +196,8 @@ def test_create_server_ssl_1(self):
TOTAL_CNT
=
25
# total number of clients that test will create
TOTAL_CNT
=
25
# total number of clients that test will create
TIMEOUT
=
support
.
LONG_TIMEOUT
# timeout for this test
TIMEOUT
=
support
.
LONG_TIMEOUT
# timeout for this test
A_DATA
=
b
'
A
'
*
1024
*
1024
A_DATA
=
b
'
A
'
*
1024
*
BUF_MULTIPLIER
B_DATA
=
b
'
B
'
*
1024
*
1024
B_DATA
=
b
'
B
'
*
1024
*
BUF_MULTIPLIER
sslctx
=
self
.
_create_server_ssl_context
(
sslctx
=
self
.
_create_server_ssl_context
(
test_utils
.
ONLYCERT
,
test_utils
.
ONLYKEY
test_utils
.
ONLYCERT
,
test_utils
.
ONLYKEY
...
@@ -287,8 +292,8 @@ def test_create_connection_ssl_1(self):
...
@@ -287,8 +292,8 @@ def test_create_connection_ssl_1(self):
CNT
=
0
CNT
=
0
TOTAL_CNT
=
25
TOTAL_CNT
=
25
A_DATA
=
b
'
A
'
*
1024
*
1024
A_DATA
=
b
'
A
'
*
1024
*
BUF_MULTIPLIER
B_DATA
=
b
'
B
'
*
1024
*
1024
B_DATA
=
b
'
B
'
*
1024
*
BUF_MULTIPLIER
sslctx
=
self
.
_create_server_ssl_context
(
sslctx
=
self
.
_create_server_ssl_context
(
test_utils
.
ONLYCERT
,
test_utils
.
ONLYCERT
,
...
@@ -1034,8 +1039,8 @@ def test_create_server_ssl_over_ssl(self):
...
@@ -1034,8 +1039,8 @@ def test_create_server_ssl_over_ssl(self):
TOTAL_CNT
=
25
# total number of clients that test will create
TOTAL_CNT
=
25
# total number of clients that test will create
TIMEOUT
=
support
.
LONG_TIMEOUT
# timeout for this test
TIMEOUT
=
support
.
LONG_TIMEOUT
# timeout for this test
A_DATA
=
b
'
A
'
*
1024
*
1024
A_DATA
=
b
'
A
'
*
1024
*
BUF_MULTIPLIER
B_DATA
=
b
'
B
'
*
1024
*
1024
B_DATA
=
b
'
B
'
*
1024
*
BUF_MULTIPLIER
sslctx_1
=
self
.
_create_server_ssl_context
(
sslctx_1
=
self
.
_create_server_ssl_context
(
test_utils
.
ONLYCERT
,
test_utils
.
ONLYKEY
)
test_utils
.
ONLYCERT
,
test_utils
.
ONLYKEY
)
...
@@ -1178,7 +1183,7 @@ def test_shutdown_cleanly(self):
...
@@ -1178,7 +1183,7 @@ def test_shutdown_cleanly(self):
CNT
=
0
CNT
=
0
TOTAL_CNT
=
25
TOTAL_CNT
=
25
A_DATA
=
b
'
A
'
*
1024
*
1024
A_DATA
=
b
'
A
'
*
1024
*
BUF_MULTIPLIER
sslctx
=
self
.
_create_server_ssl_context
(
sslctx
=
self
.
_create_server_ssl_context
(
test_utils
.
ONLYCERT
,
test_utils
.
ONLYKEY
)
test_utils
.
ONLYCERT
,
test_utils
.
ONLYKEY
)
...
...
This diff is collapsed.
Click to expand it.
Misc/NEWS.d/next/Tests/2022-08-05-09-57-43.gh-issue-95573.edMdQB.rst
0 → 100644
+
6
−
0
View file @
3a9e1fda
:source:`Lib/test/test_asyncio/test_ssl.py` exposed a bug in the macOS
kernel where intense concurrent load on non-blocking sockets occasionally
causes :const:`errno.ENOBUFS` ("No buffer space available") to be emitted.
FB11063974 filed with Apple, in the mean time as a workaround buffer size
used in tests on macOS is decreased to avoid intermittent failures. Patch
by Fantix King.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment