Commit 2831c80d authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'brodock/database-cleaner-strategy' into 'master'

Switch database cleaner strategy from `:trunction` to `:deletion`

See merge request gitlab-org/gitlab!66677
parents 7d08dabe 623262eb
...@@ -5,10 +5,12 @@ require_relative 'db_cleaner' ...@@ -5,10 +5,12 @@ require_relative 'db_cleaner'
RSpec.configure do |config| RSpec.configure do |config|
include DbCleaner include DbCleaner
# Ensure all sequences are reset at the start of the suite run # Ensure the database is empty at the start of the suite run with :deletion strategy
# neither the sequence is reset nor the tables are vacuum, but this provides
# better I/O performance on machines with slower storage
config.before(:suite) do config.before(:suite) do
setup_database_cleaner setup_database_cleaner
DatabaseCleaner.clean_with(:truncation) DatabaseCleaner.clean_with(:deletion)
end end
config.append_after(:context, :migration) do config.append_after(:context, :migration) do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment