diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/support/helpers/usage_data_helpers.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) | |
download | gitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/support/helpers/usage_data_helpers.rb')
-rw-r--r-- | spec/support/helpers/usage_data_helpers.rb | 5 |
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 |