[Python-checkins] cpython (merge 3.3 -> default): Issue #19919: Fix flacky SSL test. connect_ex() sometimes returns

christian.heimes python-checkins at python.org
Mon Dec 16 21:17:15 CET 2013


http://hg.python.org/cpython/rev/593c3fa7aa2c
changeset: 88007:593c3fa7aa2c
parent: 88004:87b81b7df7f0
parent: 88006:40955ae17472
user: Christian Heimes <christian at cheimes.de>
date: Mon Dec 16 21:16:45 2013 +0100
summary:
 Issue #19919: Fix flacky SSL test. connect_ex() sometimes returns
EWOULDBLOCK on Windows or VMs hosted on Windows.
files:
 Lib/test/test_ssl.py | 6 ++++--
 Misc/NEWS | 3 +++
 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -1201,8 +1201,10 @@
 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
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -192,6 +192,9 @@
 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.
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /