Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit de57074

Browse files
committed
Issue #19919: Fix flacky SSL test. connect_ex() sometimes returns
EWOULDBLOCK on Windows or VMs hosted on Windows.
1 parent 1007432 commit de57074

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Lib/test/test_ssl.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,8 +835,10 @@ def test_connect_ex_error(self):
835835
cert_reqs=ssl.CERT_REQUIRED,
836836
ca_certs=SVN_PYTHON_ORG_ROOT_CERT)
837837
try:
838-
self.assertEqual(errno.ECONNREFUSED,
839-
s.connect_ex(("svn.python.org", 444)))
838+
rc = s.connect_ex(("svn.python.org", 444))
839+
# Issue #19919: Windows machines or VMs hosted on Windows
840+
# machines sometimes return EWOULDBLOCK.
841+
self.assertIn(rc, (errno.ECONNREFUSED, errno.EWOULDBLOCK))
840842
finally:
841843
s.close()
842844

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ IDLE
149149
Tests
150150
-----
151151

152+
- Issue #19919: Fix flacky SSL test. connect_ex() sometimes returns
153+
EWOULDBLOCK on Windows or VMs hosted on Windows.
154+
152155
- Issue #19912: Added tests for ntpath.splitunc().
153156

154157
- Issue #19828: Fixed test_site when the whole suite is run with -S.

0 commit comments

Comments
 (0)