summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/usage_data_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-27 21:07:53 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-27 21:07:53 +0000
commitf50b93c373428d624cc2cabe98e4022dce846e67 (patch)
tree0349e25d3d106aabd6b520afa96ebd35578ab38b /spec/lib/gitlab/usage_data_spec.rb
parente20baee820ea2c76ee16980a98e8080f255d9035 (diff)
downloadgitlab-ce-f50b93c373428d624cc2cabe98e4022dce846e67.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/usage_data_spec.rb')
-rw-r--r--spec/lib/gitlab/usage_data_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb
index fb60ac955de..c148f5e63a5 100644
--- a/spec/lib/gitlab/usage_data_spec.rb
+++ b/spec/lib/gitlab/usage_data_spec.rb
@@ -85,6 +85,13 @@ describe Gitlab::UsageData, :aggregate_failures do
expect { subject }.not_to raise_error
end
+
+ it 'jira usage works when queries time out' do
+ allow_any_instance_of(ActiveRecord::Relation)
+ .to receive(:find_in_batches).and_raise(ActiveRecord::StatementInvalid.new(''))
+
+ expect { described_class.jira_usage }.not_to raise_error
+ end
end
describe '#usage_data_counters' do