Skip to content

Commit

Permalink
Fix connection pool spec to expect correct pool type on Ruby 3.4+
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed May 17, 2024
1 parent a607c43 commit df03e62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/core/connection_pool_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1272,11 +1272,11 @@ def @pool.acquire(_,_=nil) raise Sequel::DatabaseDisconnectError; end
end

it "should default to :single without :single_threaded or :servers" do
Sequel::ConnectionPool.send(:get_pool, db, {}).pool_type.must_equal :threaded
Sequel::ConnectionPool.send(:get_pool, db, {}).pool_type.must_equal(RUBY_VERSION >= '3.4' ? :timed_queue : :threaded)
end

it "should default to :single without :single_threaded with :servers" do
Sequel::ConnectionPool.send(:get_pool, db, :servers=>{}).pool_type.must_equal :sharded_threaded
Sequel::ConnectionPool.send(:get_pool, db, :servers=>{}).pool_type.must_equal(RUBY_VERSION >= '3.4' ? :sharded_timed_queue : :sharded_threaded)
end
end unless ENV['SEQUEL_DEFAULT_CONNECTION_POOL']

Expand Down

0 comments on commit df03e62

Please sign in to comment.