summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-06-06 14:11:45 +0000
committerStan Hu <stanhu@gmail.com>2019-06-06 14:11:45 +0000
commit431f33fe8e6e6fea2f5bdfcdb1e4543487e885a1 (patch)
treee20439dfb3fc613655b6739e8b4137aab3f799d1
parente5aba4b153d4ebaa8a6b0683f7ecae706e9c7e45 (diff)
parent2d4447808d23687d1398186f224f3fb7e3fb7cd7 (diff)
downloadgitlab-ce-431f33fe8e6e6fea2f5bdfcdb1e4543487e885a1.tar.gz
Merge branch 'jv-catfile-limit-test-only' into 'master'
Only use Gitaly catfile_cache_size=5 in test See merge request gitlab-org/gitlab-ce!29264
-rw-r--r--lib/gitlab/setup_helper.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/setup_helper.rb b/lib/gitlab/setup_helper.rb
index 61fcb562106..0d3e78c0a66 100644
--- a/lib/gitlab/setup_helper.rb
+++ b/lib/gitlab/setup_helper.rb
@@ -43,7 +43,13 @@ module Gitlab
config[:'gitaly-ruby'] = { dir: File.join(gitaly_dir, 'ruby') } if gitaly_ruby
config[:'gitlab-shell'] = { dir: Gitlab.config.gitlab_shell.path }
config[:bin_dir] = Gitlab.config.gitaly.client_path
- config[:git] = { catfile_cache_size: 5 }
+
+ if Rails.env.test?
+ # Compared to production, tests run in constrained environments. This
+ # number is meant to grow with the number of concurrent rails requests /
+ # sidekiq jobs, and concurrency will be low anyway in test.
+ config[:git] = { catfile_cache_size: 5 }
+ end
TomlRB.dump(config)
end