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>2020-01-29 00:08:56 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-29 00:08:56 +0300
commitc1924b863ad66503edbaa3325949bce6b023b737 (patch)
treed6ab8e583d5cdb0849e10677c6223f4efbeca993 /spec/lib/gitlab/cache
parent6315ed9630fb1c6ade3114beb762cd1568d79219 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/cache')
-rw-r--r--spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb b/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb
index c2816f35cec..fc9266f75fb 100644
--- a/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb
+++ b/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb
@@ -114,6 +114,24 @@ describe Gitlab::Cache::Ci::ProjectPipelineStatus, :clean_gitlab_redis_cache do
pipeline_status.load_status
pipeline_status.load_status
end
+
+ it 'handles Gitaly unavailable exceptions gracefully' do
+ allow(pipeline_status).to receive(:commit).and_raise(GRPC::Unavailable)
+
+ expect(Gitlab::ErrorTracking).to receive(:track_exception).with(
+ an_instance_of(GRPC::Unavailable), project_id: project.id
+ )
+ expect { pipeline_status.load_status }.not_to raise_error
+ end
+
+ it 'handles Gitaly timeout exceptions gracefully' do
+ allow(pipeline_status).to receive(:commit).and_raise(GRPC::DeadlineExceeded)
+
+ expect(Gitlab::ErrorTracking).to receive(:track_exception).with(
+ an_instance_of(GRPC::DeadlineExceeded), project_id: project.id
+ )
+ expect { pipeline_status.load_status }.not_to raise_error
+ end
end
describe "#load_from_project", :clean_gitlab_redis_cache do