summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorAndrew Newdigate <andrew@gitlab.com>2017-11-29 09:12:12 +0000
committerRémy Coutable <remy@rymai.me>2017-11-29 09:12:12 +0000
commit64e5f996fa01d2e9c8462cfbb647997531eaf6c7 (patch)
treeb3bebc2fd1be9822f8be2124aee9acff5acd3ded /spec/lib
parenta4f8dddc212fcd91f6a4a09e92b2de6117a21305 (diff)
downloadgitlab-ce-64e5f996fa01d2e9c8462cfbb647997531eaf6c7.tar.gz
Add timeouts for Gitaly calls
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/gitaly_client_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/lib/gitlab/gitaly_client_spec.rb b/spec/lib/gitlab/gitaly_client_spec.rb
index a1f4e65b8d4..a871ed0df0e 100644
--- a/spec/lib/gitlab/gitaly_client_spec.rb
+++ b/spec/lib/gitlab/gitaly_client_spec.rb
@@ -278,4 +278,20 @@ describe Gitlab::GitalyClient, skip_gitaly_mock: true do
end
end
end
+
+ describe 'timeouts' do
+ context 'with default values' do
+ before do
+ stub_application_setting(gitaly_timeout_default: 55)
+ stub_application_setting(gitaly_timeout_medium: 30)
+ stub_application_setting(gitaly_timeout_fast: 10)
+ end
+
+ it 'returns expected values' do
+ expect(described_class.default_timeout).to be(55)
+ expect(described_class.medium_timeout).to be(30)
+ expect(described_class.fast_timeout).to be(10)
+ end
+ end
+ end
end