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,6 +44,9 @@ class NomosCli:
self._port_map = {} self._port_map = {}
if self._command == "client_node":
cmd = ["tail", "-f", "/dev/null"]
else:
cmd = [NOMOS_CLI, self._command] cmd = [NOMOS_CLI, self._command]
for flag in nomos_cli[self._command]["flags"]: for flag in nomos_cli[self._command]["flags"]:
for f, indexes in flag.items(): for f, indexes in flag.items():
@ -72,7 +75,6 @@ class NomosCli:
decode_only = kwargs.get("decode_only", False) decode_only = kwargs.get("decode_only", False)
return self.reconstruct(decode_only=decode_only) return self.reconstruct(decode_only=decode_only)
case "client_node": case "client_node":
delay(3600)
return None return None
case _: case _:
return None return None

View File

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

View File

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