Commit b86c4e44 authored by Jason Madden's avatar Jason Madden

Second attempt at fixing test__socket_dns: use a different host.

parent da1b41af
......@@ -222,6 +222,7 @@ class TestCreateConnection(greentest.TestCase):
else:
raise AssertionError('create_connection did not raise socket.error as expected')
class TestFunctions(greentest.TestCase):
def test_wait_timeout(self):
......@@ -229,9 +230,11 @@ class TestFunctions(greentest.TestCase):
import gevent.socket
import gevent._socketcommon
orig_get_hub = gevent.socket.get_hub
class get_hub(object):
def wait(self, io):
gevent.sleep(10)
class io(object):
callback = None
......
......@@ -318,15 +318,14 @@ for ip, host in re.findall(r'^\s*(\d+\.\d+\.\d+\.\d+)\s+([^\s]+)', etc_hosts, re
class TestGeventOrg(TestCase):
pass
def _normalize_result(self, result):
if isinstance(result, (list, tuple)):
# Attempt to account for round-robin DNS responses
# that return the same results in different orders
result = sorted(result)
return result
add(TestGeventOrg, 'gevent.org')
# For this test to work correctly, it needs to resolve to
# an address with a single A record; round-robin DNS and multiple A records
# may mess it up (subsequent requests---and we always make two---may return
# unequal results). We used to use gevent.org, but that now has multiple A records;
# trying www.gevent.org which is a CNAME to readthedocs.org.
add(TestGeventOrg, 'www.gevent.org')
class TestFamily(TestCase):
......
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