test: client node run

This commit is contained in:
Roman 2025-03-05 04:03:27 +00:00
parent 7e11b4939c
commit 6ff8510d61
No known key found for this signature in database
GPG Key ID: BB3828275C58EFF1
3 changed files with 13 additions and 9 deletions

View File

@ -44,12 +44,15 @@ class NomosCli:
self._port_map = {}
cmd = [NOMOS_CLI, self._command]
for flag in nomos_cli[self._command]["flags"]:
for f, indexes in flag.items():
cmd.append(f)
for j in indexes:
cmd.append(input_values[j])
if self._command == "client_node":
cmd = ["tail", "-f", "/dev/null"]
else:
cmd = [NOMOS_CLI, self._command]
for flag in nomos_cli[self._command]["flags"]:
for f, indexes in flag.items():
cmd.append(f)
for j in indexes:
cmd.append(input_values[j])
logger.debug(f"NomosCli command to run {cmd}")
@ -72,7 +75,6 @@ class NomosCli:
decode_only = kwargs.get("decode_only", False)
return self.reconstruct(decode_only=decode_only)
case "client_node":
delay(3600)
return None
case _:
return None

View File

@ -44,7 +44,7 @@ class StepsCommon:
def cluster_setup(self):
logger.debug(f"Running fixture setup: {inspect.currentframe().f_code.co_name}")
self.main_nodes = []
self.cli_nodes = []
self.client_nodes = []
@pytest.fixture(scope="function")
def setup_2_node_cluster(self, request):
@ -101,6 +101,6 @@ class StepsCommon:
for i in range(num_clients):
cli_node = NomosCli(command="client_node")
self.cli_nodes.append(cli_node)
self.client_nodes.append(cli_node)
delay(1)

View File

@ -121,6 +121,8 @@ class TestHighLoadDos(StepsDataAvailability):
successful_downloads = 0
unsuccessful_downloads = 0
self.client_nodes[0].run()
while True:
if time.time() - start_time > timeout:
break