Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-03-18 23:02:30 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-18 23:02:30 +0300
commit41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch)
tree9c8d89a8624828992f06d892cd2f43818ff5dcc8 /spec/support/shared_examples/metrics/active_record_subscriber_shared_examples.rb
parent0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff)
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'spec/support/shared_examples/metrics/active_record_subscriber_shared_examples.rb')
-rw-r--r--spec/support/shared_examples/metrics/active_record_subscriber_shared_examples.rb35
1 files changed, 0 insertions, 35 deletions
diff --git a/spec/support/shared_examples/metrics/active_record_subscriber_shared_examples.rb b/spec/support/shared_examples/metrics/active_record_subscriber_shared_examples.rb
index 6e8c340582a..3f187a7e9e4 100644
--- a/spec/support/shared_examples/metrics/active_record_subscriber_shared_examples.rb
+++ b/spec/support/shared_examples/metrics/active_record_subscriber_shared_examples.rb
@@ -91,21 +91,6 @@ RSpec.shared_examples 'store ActiveRecord info in RequestStore' do |db_role|
end
end
end
-
- context 'when the GITLAB_MULTIPLE_DATABASE_METRICS env var is disabled' do
- before do
- stub_env('GITLAB_MULTIPLE_DATABASE_METRICS', nil)
- end
-
- it 'does not include per database metrics' do
- Gitlab::WithRequestStore.with_request_store do
- subscriber.sql(event)
-
- expect(described_class.db_counter_payload).not_to include(:"db_replica_#{db_config_name}_duration_s")
- expect(described_class.db_counter_payload).not_to include(:"db_replica_#{db_config_name}_count")
- end
- end
- end
end
RSpec.shared_examples 'record ActiveRecord metrics in a metrics transaction' do |db_role|
@@ -160,26 +145,6 @@ RSpec.shared_examples 'record ActiveRecord metrics in a metrics transaction' do
subscriber.sql(event)
end
-
- context 'when the GITLAB_MULTIPLE_DATABASE_METRICS env var is disabled' do
- before do
- stub_env('GITLAB_MULTIPLE_DATABASE_METRICS', nil)
- end
-
- it 'does not include db_config_name label' do
- allow(transaction).to receive(:increment) do |*args|
- labels = args[2] || {}
- expect(labels).not_to include(:db_config_name)
- end
-
- allow(transaction).to receive(:observe) do |*args|
- labels = args[2] || {}
- expect(labels).not_to include(:db_config_name)
- end
-
- subscriber.sql(event)
- end
- end
end
RSpec.shared_examples 'record ActiveRecord metrics' do |db_role|