diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-01 09:06:47 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-01 09:06:47 +0000 |
commit | f7a13c56bf0ed7ff9591bf4cbf9e50487255c4bc (patch) | |
tree | cae9893580133cdd133c8238d0e9b781a1735ec6 /spec/lib/gitlab/gitaly_client_spec.rb | |
parent | 9b8d0d898eb2e1b698c93e468c8a9eb928d75d09 (diff) | |
download | gitlab-ce-f7a13c56bf0ed7ff9591bf4cbf9e50487255c4bc.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/gitaly_client_spec.rb')
-rw-r--r-- | spec/lib/gitlab/gitaly_client_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/lib/gitlab/gitaly_client_spec.rb b/spec/lib/gitlab/gitaly_client_spec.rb index 67fe89f3fbe..43df8a263a2 100644 --- a/spec/lib/gitlab/gitaly_client_spec.rb +++ b/spec/lib/gitlab/gitaly_client_spec.rb @@ -17,6 +17,28 @@ describe Gitlab::GitalyClient do }) end + describe '.long_timeout' do + context 'default case' do + it { expect(subject.long_timeout).to eq(6.hours) } + end + + context 'running in Unicorn' do + before do + stub_const('Unicorn', 1) + end + + it { expect(subject.long_timeout).to eq(55) } + end + + context 'running in Puma' do + before do + stub_const('Puma', 1) + end + + it { expect(subject.long_timeout).to eq(55) } + end + end + describe '.filesystem_id_from_disk' do it 'catches errors' do [Errno::ENOENT, Errno::EACCES, JSON::ParserError].each do |error| |