Commit 2261188f authored by Dylan Griffith's avatar Dylan Griffith

Rename Runner#invalidate_build_cache -> Runner#pick_build

parent 0e5c1a89
......@@ -205,7 +205,7 @@ module Ci
end
end
def invalidate_build_cache!(build)
def pick_build!(build)
if can_pick?(build)
tick_runner_queue
end
......
......@@ -8,7 +8,7 @@ module Ci
def tick_for(build, runners)
runners.each do |runner|
runner.invalidate_build_cache!(build)
runner.pick_build!(build)
end
end
end
......
......@@ -792,7 +792,7 @@ describe Ci::Runner do
end
end
describe '#invalidate_build_cache!' do
describe '#pick_build!' do
context 'runner can pick the build' do
it 'calls #tick_runner_queue' do
ci_build = build :ci_build
......@@ -801,7 +801,7 @@ describe Ci::Runner do
expect(runner).to receive(:tick_runner_queue)
runner.invalidate_build_cache!(ci_build)
runner.pick_build!(ci_build)
end
end
......@@ -813,7 +813,7 @@ describe Ci::Runner do
expect(runner).not_to receive(:tick_runner_queue)
runner.invalidate_build_cache!(ci_build)
runner.pick_build!(ci_build)
end
end
end
......
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