Only use Gitaly catfile_cache_size=5 in test

This commit is contained in:
Jacob Vosmaer 2019-06-06 14:11:44 +00:00 committed by Stan Hu
parent e5aba4b153
commit 2d4447808d
1 changed files with 7 additions and 1 deletions

View File

@ -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