Skip to content

Commit f248bae

Browse files
committed
Try fixing intermittent tests with different database cleaner strategy
The database cleaner documentation warns that using a different database connection breaks the ability to use the transaction strategy. I thought it's possible this might be the cause for the intermittent test if rake tasks use a different process or connection. I've also added logging in the previous commit so even if this doesn't fix the issue we may have other clues next time.
1 parent b667632 commit f248bae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/rails_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101

102102
config.around(type: :task) do |example|
103103
DatabaseCleaner.clean_with(:truncation)
104-
DatabaseCleaner.strategy = :transaction
104+
DatabaseCleaner.strategy = :truncation
105105

106106
DatabaseCleaner.cleaning do
107107
Rails.application.load_tasks

0 commit comments

Comments
 (0)