Commit a71a4cfa authored by anonym's avatar anonym
Browse files

Test suite: raise special exception for Tor bootstrap failures.

parent 8df0d419
......@@ -156,16 +156,19 @@ def retry_action(max_retries, options = {}, &block)
end
end
class TorBootstrapFailure < StandardError
end
def wait_until_tor_is_working
try_for(270) { $vm.execute('/usr/local/sbin/tor-has-bootstrapped').success? }
rescue Timeout::Error => e
rescue Timeout::Error
c = $vm.execute("journalctl SYSLOG_IDENTIFIER=restart-tor")
if c.success?
debug_log("From the journal:\n" + c.stdout.sub(/^/, " "))
else
debug_log("Nothing was in the journal about 'restart-tor'")
end
raise e
raise TorBootstrapFailure.new('Tor failed to bootstrap')
end
def convert_bytes_mod(unit)
......
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