summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-07-09 00:31:24 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-07-09 00:31:24 (GMT)
commit9163c473dc0e025bc3b922a94edc82d81667a05d (patch)
tree536ffe22e8cfe820a3d84075318c6eca8343cc52
parent3aba49899c1f78daf1bafce5b1fd46acbd15b2f2 (diff)
downloadcpython-9163c473dc0e025bc3b922a94edc82d81667a05d.zip
cpython-9163c473dc0e025bc3b922a94edc82d81667a05d.tar.gz
cpython-9163c473dc0e025bc3b922a94edc82d81667a05d.tar.bz2
Skip network tests when getaddrinfo() returns EAI_AGAIN, meaning a temporary
failure in name resolution. Should fix a buildbot failure.
-rw-r--r--Lib/test/support.py1
-rw-r--r--Misc/NEWS3
2 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/support.py b/Lib/test/support.py
index 83ea6c1..e2d7ae0 100644
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -867,6 +867,7 @@ def transient_internet(resource_name, *, timeout=30.0, errnos=()):
('ETIMEDOUT', 110),
]
default_gai_errnos = [
+ ('EAI_AGAIN', -3),
('EAI_NONAME', -2),
('EAI_NODATA', -5),
# Encountered when trying to resolve IPv6-only hostnames
diff --git a/Misc/NEWS b/Misc/NEWS
index e4ddb3c..b550cc2 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -19,6 +19,9 @@ Library
Tests
-----
+- Skip network tests when getaddrinfo() returns EAI_AGAIN, meaning a temporary
+ failure in name resolution.
+
- Avoid failing in test_urllibnet.test_bad_address when some overzealous
DNS service (e.g. OpenDNS) resolves a non-existent domain name. The test
is now skipped instead.