Commit a0fb4cca authored by Jason Madden's avatar Jason Madden

Tweak for appveyor DNS returning interesting things for www.gevent.org. [travis skip]

parent f8f1f487
......@@ -15,6 +15,7 @@ import gevent.socket as gevent_socket
from gevent.testing.util import log
from gevent.testing import six
from gevent.testing.six import xrange
from gevent.testing import flaky
resolver = gevent.get_hub().resolver
......@@ -224,6 +225,18 @@ class TestCase(greentest.TestCase):
switch_expected = None
verbose_dns = False
def setUp(self):
super(TestCase, self).setUp()
if not self.verbose_dns:
# Silence the default reporting of errors from the ThreadPool,
# we handle those here.
gevent.get_hub().exception_stream = None
def tearDown(self):
if not self.verbose_dns:
del gevent.get_hub().exception_stream
super(TestCase, self).tearDown()
def should_log_results(self, result1, result2):
if not self.verbose_dns:
return False
......@@ -697,7 +710,14 @@ class Test_getnameinfo_fail(TestCase):
class TestInvalidPort(TestCase):
@flaky.reraises_flaky_race_condition()
def test1(self):
# An Appveyor beginning 2019-03-21, the system resolver
# sometimes returns ('23.100.69.251', '65535') instead of
# raising an error. That IP address belongs to
# readthedocs[.io?] which is where www.gevent.org is a CNAME
# to...but it doesn't actually *reverse* to readthedocs.io.
# Can't reproduce locally, not sure what's happening
self._test('getnameinfo', ('www.gevent.org', -1), 0)
def test2(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment