Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-28 15:09:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-28 15:09:11 +0300
commiteea806d673f060c2660c84ef8fe7f964824460de (patch)
tree35c76559074ef7d1b0135f9531ed77253b5cb1b5 /spec/controllers
parentd81f7fc0b3c75a7c95528f21d55be2dd26521f2e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/graphql_controller_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/controllers/graphql_controller_spec.rb b/spec/controllers/graphql_controller_spec.rb
index e85f5b7a972..1d2f1085d3c 100644
--- a/spec/controllers/graphql_controller_spec.rb
+++ b/spec/controllers/graphql_controller_spec.rb
@@ -27,6 +27,18 @@ RSpec.describe GraphqlController do
)
end
+ it 'handles a timeout nicely' do
+ allow(subject).to receive(:execute) do
+ raise ActiveRecord::QueryCanceled, '**taps wristwatch**'
+ end
+
+ post :execute
+
+ expect(json_response).to include(
+ 'errors' => include(a_hash_including('message' => /Request timed out/))
+ )
+ end
+
it 'handles StandardError' do
allow(subject).to receive(:execute) do
raise StandardError, message