Disable transactions in check_rake_spec.rb
What does this MR do and why?
Previously this was happening:
- TestProf/DbCleaner starts a transaction.
-
SystemCheck::App::TableTruncateCheck
uses that connection to runSELECT EXISTS
for all tables. - The connection idles in transaction.
-
SystemCheck::App::MigrationsAreUpCheck
attempts to run rake db:migrate:status, but the database is deadlocked due to the transaction..
We can add the :delete
in the test metadata to avoid using a transaction.
Relates to #432194 (closed)
How to set up and validate locally
SKIP_DATABASE_CONFIG_VALIDATION=true FOSS_ONLY=1 bin/rspec -f d spec/lib/gitlab/background_migration/backfill_prepared_at_merge_requests_spec.rb spec/tasks/gitlab/check_rake_spec.rb
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Stan Hu