From df03e625e59ddb2b13aba23159cffcc9b0213e4d Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Fri, 17 May 2024 11:01:42 -0700 Subject: [PATCH] Fix connection pool spec to expect correct pool type on Ruby 3.4+ --- spec/core/connection_pool_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/core/connection_pool_spec.rb b/spec/core/connection_pool_spec.rb index 26976486b..0ace412d6 100644 --- a/spec/core/connection_pool_spec.rb +++ b/spec/core/connection_pool_spec.rb @@ -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']