diff options
author | Sean McGivern <sean@gitlab.com> | 2018-10-15 10:39:09 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-10-16 11:11:20 +0100 |
commit | 7a5955ba5bac14021099c7ee3a62d914b5c7fa4b (patch) | |
tree | 3339ad240656a7b4ef544500893873f77eaf72b3 /spec/lib/gitlab/usage_data_spec.rb | |
parent | 0d3cc8663688c997e910cc7bbb1e4b22057854e8 (diff) | |
download | gitlab-ce-7a5955ba5bac14021099c7ee3a62d914b5c7fa4b.tar.gz |
Verify that usage ping works when all counts time out
Diffstat (limited to 'spec/lib/gitlab/usage_data_spec.rb')
-rw-r--r-- | spec/lib/gitlab/usage_data_spec.rb | 7 |
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 d669c42ab4a..69ee5ff4bcd 100644 --- a/spec/lib/gitlab/usage_data_spec.rb +++ b/spec/lib/gitlab/usage_data_spec.rb @@ -127,6 +127,13 @@ describe Gitlab::UsageData do expect(count_data[:clusters_applications_prometheus]).to eq(1) expect(count_data[:clusters_applications_runner]).to eq(1) end + + it 'works when queries time out' do + allow_any_instance_of(ActiveRecord::Relation) + .to receive(:count).and_raise(ActiveRecord::StatementInvalid.new('')) + + expect { subject }.not_to raise_error + end end describe '#features_usage_data_ce' do |