Skip to content

Commit f247c7b

Browse files
authored
Merge pull request #781 from supercaracal/add-timeout-option-to-test-helper-for-cluster
Add timeout option value to test support helper for cluster
2 parents b9e39df + d2e3aea commit f247c7b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/support/cluster/orchestrator.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ class ClusterOrchestrator
77

88
def initialize(node_addrs)
99
raise 'Redis Cluster requires at least 3 master nodes.' if node_addrs.size < 3
10-
@clients = node_addrs.map { |addr| Redis.new(url: addr) }
10+
timeout_sec = Float(ENV['TIMEOUT'] || 30.0)
11+
@clients = node_addrs.map { |addr| Redis.new(url: addr, timeout: timeout_sec) }
1112
end
1213

1314
def rebuild

0 commit comments

Comments
 (0)