We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8bd3cd commit e8835a1Copy full SHA for e8835a1
lib/database_cleaner/active_record/transaction.rb
@@ -19,8 +19,10 @@ def start
19
20
def clean
21
connection_class.connection_pool.connections.each do |connection|
22
- next unless connection.open_transactions > 0
23
- connection.rollback_transaction
+ connection.lock.synchronize do
+ next unless connection.open_transactions > 0
24
+ connection.rollback_transaction
25
+ end
26
end
27
28
0 commit comments