You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rails 7.1: DEPRECATION WARNING: Calling ActiveRecord::Base.clear_active_connections! is deprecated. Please call the method directly on the connection handler; for example: ActiveRecord::Base.connection_handler.clear_active_connections!
#205
Closed
andreavocado opened this issue
Feb 14, 2024
· 1 comment
· Fixed by #208
When running run_rpc method from gruf-rspec under Rails 7.1 the deprecation warning "DEPRECATION WARNING: Calling ActiveRecord::Base.clear_active_connections! is deprecated. Please call the method directly on the connection handler; for example: ActiveRecord::Base.connection_handler.clear_active_connections!" is shown.
Please describe the issue
When running
run_rpc
method from gruf-rspec under Rails 7.1 the deprecation warning "DEPRECATION WARNING: CallingActiveRecord::Base.clear_active_connections! is deprecated. Please call the method directly on the connection handler; for example:
ActiveRecord::Base.connection_handler.clear_active_connections!" is shown.This line should be migrated:
gruf/lib/gruf/interceptors/active_record/connection_reset.rb
Line 36 in 8ea05f6
How to Reproduce
Steps to reproduce the behavior:
Run any test with
run_rpc
method from gruf-rspecWhat should happen?
The connection is cleared on the connection handler of AR and the deprecation warning is gone.
Anything else we should know?
The text was updated successfully, but these errors were encountered: