Commit eb24eea9 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix spec failures

parent e3f322f3
...@@ -33,7 +33,7 @@ describe Geo::RepositorySyncService, services: true do ...@@ -33,7 +33,7 @@ describe Geo::RepositorySyncService, services: true do
it 'releases lease' do it 'releases lease' do
expect(Gitlab::ExclusiveLease).to receive(:cancel).once.with( expect(Gitlab::ExclusiveLease).to receive(:cancel).once.with(
subject.__send__(:lease_key), false).and_call_original subject.__send__(:lease_key), anything).and_call_original
subject.execute subject.execute
end end
......
...@@ -13,10 +13,10 @@ describe UpdateAllMirrorsWorker do ...@@ -13,10 +13,10 @@ describe UpdateAllMirrorsWorker do
end end
it 'does not execute if cannot get the lease' do it 'does not execute if cannot get the lease' do
allow_any_instance_of(Gitlab::ExclusiveLease).to receive(:try_obtain).and_return(false)
create(:empty_project, :mirror) create(:empty_project, :mirror)
allow_any_instance_of(Gitlab::ExclusiveLease).to receive(:try_obtain).and_return(false)
expect(worker).not_to receive(:fail_stuck_mirrors!) expect(worker).not_to receive(:fail_stuck_mirrors!)
worker.perform worker.perform
......
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