Skip to content

Commit

Permalink
removed max_retries from Hobson.config and hard coded it to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredatron committed Apr 24, 2012
1 parent 9d4c445 commit d74b1b3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions lib/hobson.rb
Expand Up @@ -16,10 +16,6 @@

module Hobson

DEFAULT_CONFIG = {
:max_retries => 3,
}.freeze

extend self

autoload :RedisSlave, 'hobson/redis_slave'
Expand All @@ -46,7 +42,7 @@ def config_path
def config
@config ||= begin
raise "unable to find hobson config file in #{root}" unless config_path.present? && File.exists?(config_path)
DEFAULT_CONFIG.merge(YAML.load_file(config_path))
YAML.load_file(config_path)
end
end

Expand Down
4 changes: 2 additions & 2 deletions lib/hobson/project/test_run/job.rb
Expand Up @@ -11,9 +11,9 @@ def tests
test_run.tests.find_all{|test| test.job == index }
end

def test_needing_to_be_run
def tests_needing_to_be_run
return [] if test_run.aborted?
tests.find_all{|test| !test.pass? && test.tries <= Hobson.config[:max_retries] }
tests.find_all{|test| !test.pass? && test.tries <= 1}
end

def tries
Expand Down
2 changes: 1 addition & 1 deletion lib/hobson/project/test_run/job/actions.rb
Expand Up @@ -28,7 +28,7 @@ def run_tests!
unless abort?
running_tests!
test_runtimes = test_run.project.test_runtimes
while (tests = test_needing_to_be_run).present?
while (tests = tests_needing_to_be_run).present?
break if abort?
eval_hook :before_running_tests, :tests => tests
break if abort?
Expand Down

0 comments on commit d74b1b3

Please sign in to comment.