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
69
69
"#<#{ self . class . name } #{ startup_nodes . values . map { |v | v . reject { |k | k == :command_builder } } } >"
70
70
end
71
71
72
+ def connect_timeout
73
+ @client_config [ :connect_timeout ] || @client_config [ :timeout ] || ::RedisClient ::Config ::DEFAULT_TIMEOUT
74
+ end
75
+
72
76
def read_timeout
73
77
@client_config [ :read_timeout ] || @client_config [ :timeout ] || ::RedisClient ::Config ::DEFAULT_TIMEOUT
74
78
end
75
79
80
+ def write_timeout
81
+ @client_config [ :write_timeout ] || @client_config [ :timeout ] || ::RedisClient ::Config ::DEFAULT_TIMEOUT
82
+ end
83
+
76
84
def new_pool ( size : 5 , timeout : 5 , **kwargs )
77
85
@client_implementation . new (
78
86
self ,
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ def teardown
24
24
25
25
def test_config
26
26
refute_nil @client . config
27
+ refute_nil @client . config . connect_timeout
27
28
refute_nil @client . config . read_timeout
29
+ refute_nil @client . config . write_timeout
28
30
end
29
31
30
32
def test_inspect
You can’t perform that action at this time.
0 commit comments