Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions ydb/tests/library/harness/kikimr_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class KikimrConfigGenerator(object):
def __init__(
self,
erasure=None,
binary_path=None,
binary_paths=None,
nodes=None,
additional_log_configs=None,
port_allocator=None,
Expand Down Expand Up @@ -186,7 +186,7 @@ def __init__(
self.__grpc_tls_key = key_pem
self.__grpc_tls_cert = cert_pem

self.__binary_path = binary_path
self.__binary_paths = binary_paths
rings_count = 3 if erasure == Erasure.MIRROR_3_DC else 1
if nodes is None:
nodes = rings_count * erasure.min_fail_domains
Expand Down Expand Up @@ -523,11 +523,11 @@ def sqs_service_enabled(self):
def output_path(self):
return self.__output_path

@property
def binary_path(self):
if self.__binary_path is not None:
return self.__binary_path
return kikimr_driver_path()
def get_binary_path(self, node_id):
binary_paths = self.__binary_paths
if not binary_paths:
binary_paths = [kikimr_driver_path()]
return binary_paths[node_id % len(binary_paths)]

def write_tls_data(self):
if self.__grpc_ssl_enable:
Expand Down
10 changes: 5 additions & 5 deletions ydb/tests/library/harness/kikimr_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def __init__(self, node_id, config_path, port_allocator, cluster_name, configura
}

daemon.Daemon.__init__(self, self.command, cwd=self.cwd, timeout=180, stderr_on_error_lines=240, **kwargs)
self.__binary_path = None
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вот тут не понял зачем это было


@property
def cwd(self):
Expand All @@ -107,9 +106,7 @@ def cwd(self):

@property
def binary_path(self):
if self.__binary_path:
return self.__binary_path
return self.__configurator.binary_path
return self.__binary_path

@property
def command(self):
Expand Down Expand Up @@ -272,7 +269,8 @@ def server(self):

def __call_kikimr_new_cli(self, cmd, connect_to_server=True):
server = 'grpc://{server}:{port}'.format(server=self.server, port=self.nodes[1].port)
full_command = [self.__configurator.binary_path]
binary_path = self.__configurator.get_binary_path(0)
full_command = [binary_path]
if connect_to_server:
full_command += ["--server={server}".format(server=server)]
full_command += cmd
Expand Down Expand Up @@ -372,6 +370,7 @@ def __register_node(self):
configurator=self.__configurator,
udfs_dir=self.__common_udfs_dir,
tenant_affiliation=self.__configurator.yq_tenant,
binary_path=self.__configurator.get_binary_path(node_index),
data_center=data_center,
)
return self._nodes[node_index]
Expand Down Expand Up @@ -402,6 +401,7 @@ def __register_slot(self, tenant_affiliation=None, encryption_key=None):
node_broker_port=node_broker_port,
tenant_affiliation=tenant_affiliation if tenant_affiliation is not None else 'dynamic',
encryption_key=encryption_key,
binary_path=self.__configurator.get_binary_path(slot_index),
)
return self._slots[slot_index]

Expand Down