summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-12-16 20:16:45 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-12-16 20:16:45 (GMT)
commitbd9cbb0691fe14b7e3beca0dc75d588713d55f69 (patch)
tree2b8d385612c5d4ab2b0fb61a9e754e4da59d5c09
parent0048c98fef96fa5df30db535bc124ee9aac341b0 (diff)
parentde57074874931bafb5fc1a91cebfb636798b7228 (diff)
downloadcpython-bd9cbb0691fe14b7e3beca0dc75d588713d55f69.zip
cpython-bd9cbb0691fe14b7e3beca0dc75d588713d55f69.tar.gz
cpython-bd9cbb0691fe14b7e3beca0dc75d588713d55f69.tar.bz2
Issue #19919: Fix flacky SSL test. connect_ex() sometimes returns
EWOULDBLOCK on Windows or VMs hosted on Windows.
-rw-r--r--Lib/test/test_ssl.py6
-rw-r--r--Misc/NEWS3
2 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 71e20ba..0aa6d04 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -1201,8 +1201,10 @@ class NetworkedTests(unittest.TestCase):
cert_reqs=ssl.CERT_REQUIRED,
ca_certs=SVN_PYTHON_ORG_ROOT_CERT)
try:
- self.assertEqual(errno.ECONNREFUSED,
- s.connect_ex(("svn.python.org", 444)))
+ rc = s.connect_ex(("svn.python.org", 444))
+ # Issue #19919: Windows machines or VMs hosted on Windows
+ # machines sometimes return EWOULDBLOCK.
+ self.assertIn(rc, (errno.ECONNREFUSED, errno.EWOULDBLOCK))
finally:
s.close()
diff --git a/Misc/NEWS b/Misc/NEWS
index 3525edf..ee3c793 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -192,6 +192,9 @@ IDLE
Tests
-----
+- Issue #19919: Fix flacky SSL test. connect_ex() sometimes returns
+ EWOULDBLOCK on Windows or VMs hosted on Windows.
+
- Issue #19912: Added tests for ntpath.splitunc().
- Issue #19828: Fixed test_site when the whole suite is run with -S.