Skip to content

Commit 86d02b0

Browse files
authored
Merge 9fdedbc into 56fbcfc
2 parents 56fbcfc + 9fdedbc commit 86d02b0

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

ydb/tests/library/harness/kikimr_config.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class KikimrConfigGenerator(object):
111111
def __init__(
112112
self,
113113
erasure=None,
114-
binary_path=None,
114+
binary_paths=None,
115115
nodes=None,
116116
additional_log_configs=None,
117117
port_allocator=None,
@@ -186,7 +186,7 @@ def __init__(
186186
self.__grpc_tls_key = key_pem
187187
self.__grpc_tls_cert = cert_pem
188188

189-
self.__binary_path = binary_path
189+
self.__binary_paths = binary_paths
190190
rings_count = 3 if erasure == Erasure.MIRROR_3_DC else 1
191191
if nodes is None:
192192
nodes = rings_count * erasure.min_fail_domains
@@ -526,11 +526,11 @@ def sqs_service_enabled(self):
526526
def output_path(self):
527527
return self.__output_path
528528

529-
@property
530-
def binary_path(self):
531-
if self.__binary_path is not None:
532-
return self.__binary_path
533-
return kikimr_driver_path()
529+
def get_binary_path(self, node_id):
530+
binary_paths = self.__binary_paths
531+
if not binary_paths:
532+
binary_paths = [kikimr_driver_path()]
533+
return binary_paths[node_id % len(binary_paths)]
534534

535535
def write_tls_data(self):
536536
if self.__grpc_ssl_enable:

ydb/tests/library/harness/kikimr_runner.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,7 @@ def cwd(self):
107107

108108
@property
109109
def binary_path(self):
110-
if self.__binary_path:
111-
return self.__binary_path
112-
return self.__configurator.binary_path
110+
return self.__binary_path
113111

114112
@property
115113
def command(self):
@@ -272,7 +270,8 @@ def server(self):
272270

273271
def __call_kikimr_new_cli(self, cmd, connect_to_server=True):
274272
server = 'grpc://{server}:{port}'.format(server=self.server, port=self.nodes[1].port)
275-
full_command = [self.__configurator.binary_path]
273+
binary_path = self.__configurator.get_binary_path(0)
274+
full_command = [binary_path]
276275
if connect_to_server:
277276
full_command += ["--server={server}".format(server=server)]
278277
full_command += cmd
@@ -372,6 +371,7 @@ def __register_node(self):
372371
configurator=self.__configurator,
373372
udfs_dir=self.__common_udfs_dir,
374373
tenant_affiliation=self.__configurator.yq_tenant,
374+
binary_path=self.__configurator.get_binary_path(node_index),
375375
data_center=data_center,
376376
)
377377
return self._nodes[node_index]
@@ -402,6 +402,7 @@ def __register_slot(self, tenant_affiliation=None, encryption_key=None):
402402
node_broker_port=node_broker_port,
403403
tenant_affiliation=tenant_affiliation if tenant_affiliation is not None else 'dynamic',
404404
encryption_key=encryption_key,
405+
binary_path=self.__configurator.get_binary_path(slot_index),
405406
)
406407
return self._slots[slot_index]
407408

0 commit comments

Comments
 (0)