diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-19 00:09:37 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-19 00:09:37 +0300 |
commit | cace5e8ff1f766b8098e35adc94abc4402aeb2a9 (patch) | |
tree | 96bea3616ee60702be89f4845580f3b3db22f936 /spec/support/database | |
parent | e4220eeccaf1d53444fdd9102a4061336f91784e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/database')
-rw-r--r-- | spec/support/database/prevent_cross_database_modification.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/database/prevent_cross_database_modification.rb b/spec/support/database/prevent_cross_database_modification.rb index 19fbf902d87..759e8316cc5 100644 --- a/spec/support/database/prevent_cross_database_modification.rb +++ b/spec/support/database/prevent_cross_database_modification.rb @@ -27,5 +27,9 @@ RSpec.configure do |config| # Reset after execution to preferred state config.after do |example_file| ::Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModification.suppress_in_rspec = true + + [::ApplicationRecord, ::Ci::ApplicationRecord].each do |base_class| + base_class.gitlab_transactions_stack.clear if base_class.respond_to?(:gitlab_transactions_stack) + end end end |