@@ -21,7 +21,7 @@ class StandardEnv(object):
2121 def __init__ (self , redisBinaryPath , port = 6379 , modulePath = None , moduleArgs = None , outputFilesFormat = None ,
2222 dbDirPath = None , useSlaves = False , serverId = 1 , password = None , libPath = None , clusterEnabled = False , decodeResponses = False ,
2323 useAof = False , useRdbPreamble = True , debugger = None , noCatch = False , unix = False , verbose = False , useTLS = False , tlsCertFile = None ,
24- tlsKeyFile = None , tlsCaCertFile = None ):
24+ tlsKeyFile = None , tlsCaCertFile = None , clusterNodeTimeout = None ):
2525 self .uuid = uuid .uuid4 ().hex
2626 self .redisBinaryPath = os .path .expanduser (redisBinaryPath ) if redisBinaryPath .startswith (
2727 '~/' ) else redisBinaryPath
@@ -52,6 +52,7 @@ def __init__(self, redisBinaryPath, port=6379, modulePath=None, moduleArgs=None,
5252 self .tlsCertFile = tlsCertFile
5353 self .tlsKeyFile = tlsKeyFile
5454 self .tlsCaCertFile = tlsCaCertFile
55+ self .clusterNodeTimeout = clusterNodeTimeout
5556
5657 if port > 0 :
5758 self .port = port
@@ -184,7 +185,7 @@ def createCmdArgs(self, role):
184185 if self .clusterEnabled and role is not SLAVE :
185186 # creating .cluster.conf in /tmp as lock fails on NFS
186187 cmdArgs += ['--cluster-enabled' , 'yes' , '--cluster-config-file' , '/tmp/' + self ._getFileName (role , '.cluster.conf' ),
187- '--cluster-node-timeout' , '5000' ]
188+ '--cluster-node-timeout' , '5000' if self . clusterNodeTimeout is None else str ( self . clusterNodeTimeout ) ]
188189 if self .useTLS :
189190 cmdArgs += ['--tls-cluster' , 'yes' ]
190191 if self .useAof :
0 commit comments