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-10-19 00:09:37 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-19 00:09:37 +0300
commitcace5e8ff1f766b8098e35adc94abc4402aeb2a9 (patch)
tree96bea3616ee60702be89f4845580f3b3db22f936 /spec/support/database
parente4220eeccaf1d53444fdd9102a4061336f91784e (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.rb4
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