Improve `BeforeAllAdapter` support
What does this MR do and why?
Fixes #334670 (comment 678950876) needed by !67486 (closed).
Usage of connection_handlers
is not always correct
as we might end-up with misaligned transactions.
The usage of AR::Base.establish_connection
is bad design
as it break before_all_adapter
and is always a misaligned transaction.
However, this will be solved in a separate MR.
The cases where it will break:
.establish_connection
.pool.disconnect!
.release_connection
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Kamil Trzciński (Back 2025-01-01)