summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamian Johnson <atagar@torproject.org>2019-05-21 10:39:37 -0700
committerDamian Johnson <atagar@torproject.org>2019-05-21 10:42:39 -0700
commit1b5cca5c4a7f9bfb2d56841ce87d6d1bf1903c6b (patch)
tree6ce0908fa780c578eb92ebb9eaaad148e572b600
parent240f347a5ccafc364a93d1c74c442f09869cb232 (diff)
When disconnected tor process integ tests timed out
Tor changed its bootstrapping behavior such that when a network connection is unavailable we hang at 0% with... May 21 10:33:30.000 [warn] Problem bootstrapping. Stuck at 0% (starting): Starting. (Network is unreachable; NOROUTE; count 10; recommendation warn; host 91D23D8A539B83D2FB56AA67ECD4D75CC093AC55 at 37.187.20.59:443) This caused four of our process integ tests to fail with timeouts... ====================================================================== FAIL: test_launch_tor_with_config_via_file ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/atagar/Desktop/stem/stem/util/test_tools.py", line 152, in <lambda> self.method = lambda test: self.result(test) # method that can be mixed into TestCases File "/home/atagar/Desktop/stem/stem/util/test_tools.py", line 227, in result test.fail(self._result.msg) AssertionError: Traceback (most recent call last): File "/home/atagar/Desktop/stem/stem/util/test_tools.py", line 169, in _wrapper runner(*args) if args else runner() File "/home/atagar/Desktop/stem/test/integ/process.py", line 462, in test_launch_tor_with_config_via_file completion_percent = 5 File "/home/atagar/Desktop/stem/stem/process.py", line 296, in launch_tor_with_config return launch_tor(tor_cmd, args, torrc_path, completion_percent, init_msg_handler, timeout, take_ownership) File "/home/atagar/Desktop/stem/stem/process.py", line 153, in launch_tor init_line = tor_process.stdout.readline().decode('utf-8', 'replace').strip() File "/home/atagar/Desktop/stem/stem/process.py", line 136, in timeout_handler raise OSError('reached a %i second timeout without success' % timeout) OSError: reached a 90 second timeout without success In practice these tests don't require any bootstrapping to pass, so dropping their required precentage to zero.
-rw-r--r--test/integ/process.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/integ/process.py b/test/integ/process.py
index 1c8035b5..d3e873f9 100644
--- a/test/integ/process.py
+++ b/test/integ/process.py
@@ -459,7 +459,7 @@ class TestProcess(unittest.TestCase):
'ControlPort': control_port,
'DataDirectory': data_directory,
},
- completion_percent = 5
+ completion_percent = 0
)
control_socket = stem.socket.ControlPort(port = int(control_port))
@@ -499,7 +499,7 @@ class TestProcess(unittest.TestCase):
'ControlPort': control_port,
'DataDirectory': data_directory,
},
- completion_percent = 5
+ completion_percent = 0
)
control_socket = stem.socket.ControlPort(port = int(control_port))
@@ -594,7 +594,7 @@ class TestProcess(unittest.TestCase):
'DataDirectory': data_directory,
'__OwningControllerProcess': str(sleep_process.pid),
},
- completion_percent = 5,
+ completion_percent = 0,
)
# Kill the sleep command. Tor should quit shortly after.
@@ -637,7 +637,7 @@ class TestProcess(unittest.TestCase):
'ControlPort': control_port,
'DataDirectory': data_directory,
},
- completion_percent = 5,
+ completion_percent = 0,
take_ownership = True,
)