diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-23 09:09:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-23 09:09:38 +0300 |
commit | 45205f0db533235111ac4e14032b395e76b526be (patch) | |
tree | efc32f75692424f5b9228b9135ae916238dccf0f /spec/lib | |
parent | a0ebcf42d29ee1272f2ebcbbde900b4832a241a2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/gpg_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/lib/gitlab/gpg_spec.rb b/spec/lib/gitlab/gpg_spec.rb index 72c6c8efb5e..66ce2d5cb8a 100644 --- a/spec/lib/gitlab/gpg_spec.rb +++ b/spec/lib/gitlab/gpg_spec.rb @@ -143,6 +143,11 @@ RSpec.describe Gitlab::Gpg do end it 'keeps track of created and removed keychains in counters' do + # Gitlab::Gpg may be memoizing stale counters if a preceding spec resets the Prometheus registry + # https://gitlab.com/gitlab-org/gitlab/-/issues/286874 + described_class.remove_instance_variable(:@tmp_keychains_created) + described_class.remove_instance_variable(:@tmp_keychains_removed) + created = Gitlab::Metrics.counter(:gpg_tmp_keychains_created_total, 'The number of temporary GPG keychains') removed = Gitlab::Metrics.counter(:gpg_tmp_keychains_removed_total, 'The number of temporary GPG keychains') |