summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkytv <killyourtv@i2pmail.org>2015-07-05 18:54:37 +0000
committerkytv <killyourtv@i2pmail.org>2015-07-06 15:02:31 +0000
commit384daf878a62b2d1510dd7b29cd5bf217d9df847 (patch)
tree8e5cfc1c0bbc5a3a6bf14ce834d899e83a355bbe
parent5a9700169f7f0700b72acd95bdd574f2188451a6 (diff)
Only retry the whois command if we explicitly see 'LIMIT EXCEEDED'
Will-fix: #9668
-rw-r--r--features/step_definitions/torified_misc.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/features/step_definitions/torified_misc.rb b/features/step_definitions/torified_misc.rb
index 6cf0722..66a5f5a 100644
--- a/features/step_definitions/torified_misc.rb
+++ b/features/step_definitions/torified_misc.rb
@@ -4,9 +4,9 @@ When /^I query the whois directory service for "([^"]+)"$/ do |domain|
until tries == $config["MAX_NEW_TOR_CIRCUIT_RETRIES"] do
begin
@vm_execute_res = @vm.execute_successfully("whois '#{domain}'", LIVE_USER)
- assert(@vm_execute_res.stdout.downcase[domain])
+ assert(!@vm_execute_res.stdout['LIMIT EXCEEDED'])
break
- rescue ExecutionFailedInVM, Test::Unit::AssertionFailedError
+ rescue Test::Unit::AssertionFailedError
tries += 1
STDERR.puts "Forcing new Tor circuit... (attempt ##{tries})" if $config["DEBUG"]
step 'I force Tor to use a new circuit'