Skip to content
Snippets Groups Projects
Commit 8074fc57 authored by David Goulet's avatar David Goulet :panda_face:
Browse files

fallbackdir: Fix how we test with Stem


Closes #40023

Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
parent f85b5952
No related branches found
No related tags found
1 merge request!8fallbackdir: Fix how we test with Stem
......@@ -39,11 +39,6 @@ def main():
issues.append('%s => ORPort is unreachable (%s:%i)' % (relay.fingerprint, relay.address, relay.or_port))
continue
if not util.is_reachable(relay.address, relay.dir_port):
log.info('%s DirPort unreachable' % relay.fingerprint)
issues.append('%s => DirPort is unreachable (%s:%i)' % (relay.fingerprint, relay.address, relay.dir_port))
continue
if relay.orport_v6 and not util.is_reachable(relay.orport_v6[0], relay.orport_v6[1]):
log.info('%s IPv6 ORPort unreachable' % relay.fingerprint)
issues.append('%s => IPv6 ORPort is unreachable (%s:%i)' % (relay.fingerprint, relay.orport_v6[0], relay.orport_v6[1]))
......@@ -51,11 +46,11 @@ def main():
try:
start = time.time()
downloader.get_consensus(endpoints = [(relay.address, relay.dir_port)]).run()
downloader.get_server_descriptors(fingerprints=[relay.fingerprint], endpoints = [stem.ORPort(relay.address, relay.or_port)]).run()
download_time = time.time() - start
log.info('%s download time was %0.1f seconds' % (relay.fingerprint, download_time))
except Exception as exc:
issues.append('%s => Unable to download from DirPort (%s)' % (relay.fingerprint, exc))
issues.append('%s => Unable to download from ORPort %d (%s)' % (relay.fingerprint, relay.or_port, exc))
continue
if download_time > 15:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment