File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -69,10 +69,18 @@ def inspect
6969 "#<#{ self . class . name } #{ startup_nodes . values . map { |v | v . reject { |k | k == :command_builder } } } >"
7070 end
7171
72+ def connect_timeout
73+ @client_config [ :connect_timeout ] || @client_config [ :timeout ] || ::RedisClient ::Config ::DEFAULT_TIMEOUT
74+ end
75+
7276 def read_timeout
7377 @client_config [ :read_timeout ] || @client_config [ :timeout ] || ::RedisClient ::Config ::DEFAULT_TIMEOUT
7478 end
7579
80+ def write_timeout
81+ @client_config [ :write_timeout ] || @client_config [ :timeout ] || ::RedisClient ::Config ::DEFAULT_TIMEOUT
82+ end
83+
7684 def new_pool ( size : 5 , timeout : 5 , **kwargs )
7785 @client_implementation . new (
7886 self ,
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ def teardown
2424
2525 def test_config
2626 refute_nil @client . config
27+ refute_nil @client . config . connect_timeout
2728 refute_nil @client . config . read_timeout
29+ refute_nil @client . config . write_timeout
2830 end
2931
3032 def test_inspect
You can’t perform that action at this time.
0 commit comments