aboutsummaryrefslogtreecommitdiff
path: root/networks/hs_intro_fail.py
diff options
context:
space:
mode:
authorChristopher Baines <cb15g11@soton.ac.uk>2014-04-11 23:52:52 +0100
committerChristopher Baines <cb15g11@soton.ac.uk>2014-04-11 23:52:52 +0100
commit43ad6bc0f94a048cfffe4ec3d22e78e75d4d6795 (patch)
tree8b7401354f76f9ac0b2f41de9fb7471f24ffff44 /networks/hs_intro_fail.py
parent4eb4e01e49d78a4a74b1e8f9bccaebd16d9ebcb1 (diff)
downloadchutney-43ad6bc0f94a048cfffe4ec3d22e78e75d4d6795.tar
chutney-43ad6bc0f94a048cfffe4ec3d22e78e75d4d6795.tar.gz
Better command line options
Diffstat (limited to 'networks/hs_intro_fail.py')
-rw-r--r--networks/hs_intro_fail.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/networks/hs_intro_fail.py b/networks/hs_intro_fail.py
index 537e881..90c7f48 100644
--- a/networks/hs_intro_fail.py
+++ b/networks/hs_intro_fail.py
@@ -1,11 +1,11 @@
from chutney.Testing import *
from chutney.TorNet import *
-from twisted.internet import reactor
-
from stem.control import EventType
def hs_fail_test(network, failures=1):
+ result = True
+
hs_nodes = network.get("h")
initial_nodes = network.get("a") + network.get("r") + network.get("c") + hs_nodes[:1]
@@ -15,8 +15,6 @@ def hs_fail_test(network, failures=1):
logging.info("All initial nodes running")
- thread.start_new_thread(reactor.run, (), {"installSignalHandlers": 0})
-
nodes_by_fingerprint = get_node_fingerprints(network.get("a") + network.get("r"))
track_introduction_points(hs_nodes[0])
@@ -27,7 +25,6 @@ def hs_fail_test(network, failures=1):
if "Successfully uploaded v2 rend descriptors" in logevent.message:
node_0_published_descriptor.set()
-
hs_nodes[0].getStemController().add_event_listener(hs_node_0_listener, EventType.INFO)
node_0_published_descriptor.wait()
@@ -106,8 +103,8 @@ def hs_fail_test(network, failures=1):
else:
logging.info("All did not change")
- check_same_intro_points()
+ result &= check_same_intro_points()
connection_test(network.get("c"), len(hs_nodes))
- reactor.stop()
+ return result