Steps to reproduce
We have a complex test with rspec, database cleaner, factorygirl. Some runs are deadlocking. Debugging showed that there is a transaction started but not finished.
A simplified case:
https://gist.github.com/mfazekas/ccf9bee10dc4fe23f39d1da1b914993b
Expected behavior
Pass or error, but not a deadlock
Actual behavior
Deadlock. Test doesn't finish
System configuration
Rails version: 5.0.0.beta3
Ruby version: 2.3.0
cannot repro in 4.2.0
Steps to reproduce
We have a complex test with rspec, database cleaner, factorygirl. Some runs are deadlocking. Debugging showed that there is a transaction started but not finished.
A simplified case:
https://gist.github.com/mfazekas/ccf9bee10dc4fe23f39d1da1b914993b
Expected behavior
Pass or error, but not a deadlock
Actual behavior
Deadlock. Test doesn't finish
System configuration
Rails version: 5.0.0.beta3
Ruby version: 2.3.0
cannot repro in 4.2.0