Commit dd64f86b authored by Jason Madden's avatar Jason Madden

gevent.org test: Normalize even when using system resolver.

20230707: Round-robin DNS on GitHub actions is constantly producing different addresses.
parent 14536969
...@@ -657,11 +657,12 @@ class TestGeventOrg(TestCase): ...@@ -657,11 +657,12 @@ class TestGeventOrg(TestCase):
# trying www.gevent.org which is a CNAME to readthedocs.org then worked, but it became # trying www.gevent.org which is a CNAME to readthedocs.org then worked, but it became
# an alias for python-gevent.readthedocs.org, which is an alias for readthedocs.io, # an alias for python-gevent.readthedocs.org, which is an alias for readthedocs.io,
# and which also has multiple addresses. So we run the resolver twice to try to get # and which also has multiple addresses. So we run the resolver twice to try to get
# the different answers, if needed. # the different answers, if needed. Even then it's not enough, so
# we normalize the two addresses we get to a single one.
HOSTNAME = 'www.gevent.org' HOSTNAME = 'www.gevent.org'
if RESOLVER_NOT_SYSTEM:
def _normalize_result_gethostbyname(self, result): def _normalize_result_gethostbyname(self, result):
if result == '104.17.33.82': if result == '104.17.33.82':
result = '104.17.32.82' result = '104.17.32.82'
......
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