fixed nasty bug where tor circuits was causing gevent to leak threads
This commit is contained in:
parent
022fbaa1af
commit
e6181bdd1f
12 changed files with 47 additions and 39 deletions
|
@ -62,10 +62,10 @@ class OnionrRunTestManager:
|
|||
for i in RUN_TESTS:
|
||||
last = i
|
||||
logger.info("[RUNTIME TEST] " + last.__name__ + " started",
|
||||
terminal=True)
|
||||
terminal=True, timestamp=True)
|
||||
i(self)
|
||||
logger.info("[RUNTIME TEST] " + last.__name__ + " passed",
|
||||
terminal=True)
|
||||
terminal=True, timestamp=True)
|
||||
except (ValueError, AttributeError):
|
||||
logger.error(last.__name__ + ' failed assertions', terminal=True)
|
||||
except Exception as e:
|
||||
|
|
|
@ -2,13 +2,10 @@
|
|||
|
||||
Ensure that clearnet cannot be reached
|
||||
"""
|
||||
from threading import Thread
|
||||
|
||||
from onionrutils.basicrequests import do_get_request
|
||||
from onionrutils import localcommand
|
||||
import logger
|
||||
import config
|
||||
|
||||
"""
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -30,7 +27,7 @@ def test_clearnet_tor_request(testmanager):
|
|||
|
||||
Does not run if Tor is being reused
|
||||
"""
|
||||
|
||||
|
||||
config.reload()
|
||||
leak_result = ""
|
||||
|
||||
|
|
|
@ -10,11 +10,15 @@ def test_lan_server(testmanager):
|
|||
try:
|
||||
if requests.get(f"http://{best_ip}:{i}/ping").text == 'pong!':
|
||||
bl = insert('test data')
|
||||
if bl not in requests.get(f"http://{best_ip}:{i}/blist/0").text:
|
||||
bl2 = insert('test data2')
|
||||
l = requests.get(f"http://{best_ip}:{i}/blist/0").text
|
||||
if bl not in l or bl2 not in l:
|
||||
raise ValueError
|
||||
if onionrblockapi.Block(bl).raw != requests.get(f"http://{best_ip}:{i}/get/{bl}").content:
|
||||
raise ValueError
|
||||
|
||||
break
|
||||
|
||||
except requests.exceptions.ConnectionError:
|
||||
pass
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue