Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clear AR connections in tests before forking for parallelization
Fixes rails#41176 which seems to affect the mysql2 and postgresql adapters. Occasionally large test suites see something like this: ``` /path/to/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/drb.rb:1003:in 'IO#wait_readable': Bad file descriptor (Errno::EBADF) from /path/to/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/drb.rb:1003:in 'DRb::DRbTCPSocket#alive?' from /path/to/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/drb.rb:1335:in 'DRb::DRbConn#alive?' from /path/to/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/drb.rb:1271:in 'block (3 levels) in DRb::DRbConn.make_pool' from /path/to/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/drb.rb:1269:in 'Array#each' from /path/to/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/drb.rb:1269:in 'block (2 levels) in DRb::DRbConn.make_pool' from /path/to/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/drb.rb:1240:in 'block in DRb::ThreadObject#_execute' from /path/to/installs/ruby/3.4.1/lib/ruby/3.4.0/monitor.rb:201:in 'Monitor#synchronize' from /path/to/installs/ruby/3.4.1/lib/ruby/3.4.0/monitor.rb:201:in 'MonitorMixin#mon_synchronize' from /path/to/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/drb.rb:1238:in 'DRb::ThreadObject#_execute' from /path/to/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/drb-2.2.1/lib/drb/drb.rb:1263:in 'block in DRb::DRbConn.make_pool' ``` Co-authored-by: Donal McBreen <[email protected]>
- Loading branch information