Skip to content

Commit

Permalink
Improved test
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Oct 7, 2024
1 parent eead742 commit e729c4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/support/query_methods_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ def test_scopes
def test_connection_leasing
skip if mongoid?

ActiveRecord::Base.connection_handler.clear_active_connections!
assert_nil ActiveRecord::Base.connection_pool.active_connection?
ActiveRecord::Base.connection_pool.with_connection do
model.connection_handler.clear_active_connections!
assert_nil model.connection_pool.active_connection?
model.connection_pool.with_connection do
count_events(value: 1)
group_events
end
assert_nil ActiveRecord::Base.connection_pool.active_connection?
assert_nil model.connection_pool.active_connection?
end

def create_event(properties)
Expand Down

0 comments on commit e729c4e

Please sign in to comment.