diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2019-06-04 12:03:48 +0000 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2019-06-04 12:03:48 +0000 |
commit | 5fd70f1779fa9ea0bd5eda523833996f71d0e706 (patch) | |
tree | 27aa4cb0a5713aa7bca5eb8a5d1180d00e414089 /spec/lib | |
parent | 72797b30479b8649cd4e4b42bb940093648daa9c (diff) | |
parent | d2ea615415311e7da1daf6b0a4e5c3a23fb2f1c2 (diff) | |
download | gitlab-ce-patch-66.tar.gz |
Merge branch 'master' into 'patch-66'patch-66
# Conflicts:
# doc/administration/high_availability/gitaly.md
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/metrics/samplers/puma_sampler_spec.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/lib/gitlab/metrics/samplers/puma_sampler_spec.rb b/spec/lib/gitlab/metrics/samplers/puma_sampler_spec.rb index c471c30a194..f4a6e1fc7d9 100644 --- a/spec/lib/gitlab/metrics/samplers/puma_sampler_spec.rb +++ b/spec/lib/gitlab/metrics/samplers/puma_sampler_spec.rb @@ -61,6 +61,33 @@ describe Gitlab::Metrics::Samplers::PumaSampler do end end + context 'with empty worker stats' do + let(:puma_stats) do + <<~EOS + { + "workers": 2, + "phase": 2, + "booted_workers": 2, + "old_workers": 0, + "worker_status": [{ + "pid": 32534, + "index": 0, + "phase": 1, + "booted": true, + "last_checkin": "2019-05-15T07:57:55Z", + "last_status": {} + }] + } + EOS + end + + it 'does not log worker stats' do + expect(subject).not_to receive(:set_worker_metrics) + + subject.sample + end + end + context 'in single mode' do let(:puma_stats) do <<~EOS |