diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-09-14 10:48:12 +0200 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-09-14 13:03:36 +0200 |
commit | 0657002251a48e39849204b6eed8e633bee32563 (patch) | |
tree | fafa0121328dcec6bfdc7a59c23dda812dc94fde /spec/workers | |
parent | 1140fcce4f8b5463f451356b76fea125826478b2 (diff) | |
download | gitlab-ce-0657002251a48e39849204b6eed8e633bee32563.tar.gz |
Restore has_visible_content? to improve performance (cache)repo-cache-fix
This method was moved to ::Git but it is not cached there which causes performance problems
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/git_garbage_collect_worker_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/workers/git_garbage_collect_worker_spec.rb b/spec/workers/git_garbage_collect_worker_spec.rb index 6f9ddb6c63c..f7b67b8efc6 100644 --- a/spec/workers/git_garbage_collect_worker_spec.rb +++ b/spec/workers/git_garbage_collect_worker_spec.rb @@ -31,8 +31,8 @@ describe GitGarbageCollectWorker do expect_any_instance_of(Repository).to receive(:after_create_branch).and_call_original expect_any_instance_of(Repository).to receive(:branch_names).and_call_original + expect_any_instance_of(Repository).to receive(:has_visible_content?).and_call_original expect_any_instance_of(Gitlab::Git::Repository).to receive(:branch_count).and_call_original - expect_any_instance_of(Gitlab::Git::Repository).to receive(:has_visible_content?).and_call_original subject.perform(project.id, :gc, lease_key, lease_uuid) end @@ -77,8 +77,8 @@ describe GitGarbageCollectWorker do expect_any_instance_of(Repository).to receive(:after_create_branch).and_call_original expect_any_instance_of(Repository).to receive(:branch_names).and_call_original + expect_any_instance_of(Repository).to receive(:has_visible_content?).and_call_original expect_any_instance_of(Gitlab::Git::Repository).to receive(:branch_count).and_call_original - expect_any_instance_of(Gitlab::Git::Repository).to receive(:has_visible_content?).and_call_original subject.perform(project.id) end |