diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-06 21:08:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-06 21:08:09 +0300 |
commit | 1287690a3678ad0ec21c9b2f3b21ae18257d5e22 (patch) | |
tree | 96162972275004dcaef6376fe324ee2a7a549833 /spec/support | |
parent | d4806ad7dbd2d87ae09872709fef1aef35792e21 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/database/prevent_cross_database_modification.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/database/prevent_cross_database_modification.rb b/spec/support/database/prevent_cross_database_modification.rb index c509aecf9b8..19fbf902d87 100644 --- a/spec/support/database/prevent_cross_database_modification.rb +++ b/spec/support/database/prevent_cross_database_modification.rb @@ -14,18 +14,18 @@ RSpec.configure do |config| # By default allow cross-modifications as we want to observe only transactions # within a specific block of execution which is defined be `before(:each)` and `after(:each)` config.before(:all) do - ::Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModification.suppress = true + ::Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModification.suppress_in_rspec = true end # Using before and after blocks because the around block causes problems with the let_it_be # record creations. It makes an extra savepoint which breaks the transaction count logic. config.before do |example_file| - ::Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModification.suppress = + ::Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModification.suppress_in_rspec = CROSS_DB_MODIFICATION_ALLOW_LIST.include?(example_file.file_path_rerun_argument) end # Reset after execution to preferred state config.after do |example_file| - ::Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModification.suppress = true + ::Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModification.suppress_in_rspec = true end end |