diff options
author | Robert Speicher <robert@gitlab.com> | 2018-10-16 16:29:56 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-10-16 16:29:56 +0000 |
commit | 65f2e955234de1f7ba54e0350eafcf3687cd13b1 (patch) | |
tree | 1d915e3e453d5e1cdd470857206bbd3f1b62eb60 | |
parent | aeaf6686df0dabd211221b1158586136707f3bdf (diff) | |
parent | 7a5955ba5bac14021099c7ee3a62d914b5c7fa4b (diff) | |
download | gitlab-ce-65f2e955234de1f7ba54e0350eafcf3687cd13b1.tar.gz |
Merge branch 'test-usage-ping-in-timeout-case' into 'master'
Verify that usage ping works when all counts time out
See merge request gitlab-org/gitlab-ce!22358
-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 |