]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-19756: Prevent test failures due to EADDRNOTAVAIL (GH-9446)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 20 Sep 2018 16:06:04 +0000 (09:06 -0700)
committerGitHub <noreply@github.com>
Thu, 20 Sep 2018 16:06:04 +0000 (09:06 -0700)
(cherry picked from commit 8213eaddf3ce8e87564d2949454903a1484748b5)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
Lib/test/support/__init__.py

index 6da25971a9ce23839a8ebcd911fc24cdc5d7ec84..c2cc009b9f48480c922ec177d7a6e1743a17912e 100644 (file)
@@ -1151,6 +1151,9 @@ def transient_internet(resource_name, timeout=30.0, errnos=()):
         ('EHOSTUNREACH', 113),
         ('ENETUNREACH', 101),
         ('ETIMEDOUT', 110),
+        # socket.create_connection() fails randomly with
+        # EADDRNOTAVAIL on Travis CI.
+        ('EADDRNOTAVAIL', 99),
     ]
     default_gai_errnos = [
         ('EAI_AGAIN', -3),