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