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:
Diffstat (limited to 'spec/support/helpers/usage_data_helpers.rb')
-rw-r--r--spec/support/helpers/usage_data_helpers.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/support/helpers/usage_data_helpers.rb b/spec/support/helpers/usage_data_helpers.rb
index 78ceaf297a8..438f0d129b9 100644
--- a/spec/support/helpers/usage_data_helpers.rb
+++ b/spec/support/helpers/usage_data_helpers.rb
@@ -116,8 +116,9 @@ module UsageDataHelpers
).freeze
def stub_usage_data_connections
- allow(ActiveRecord::Base.connection).to receive(:transaction_open?).and_return(false)
- allow(::Ci::ApplicationRecord.connection).to receive(:transaction_open?).and_return(false) if ::Ci::ApplicationRecord.connection_class?
+ Gitlab::Database.database_base_models_with_gitlab_shared.each_value do |base_model|
+ allow(base_model.connection).to receive(:transaction_open?).and_return(false)
+ end
allow(Gitlab::Prometheus::Internal).to receive(:prometheus_enabled?).and_return(false)
end