Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Schmidt committed Oct 30, 2023
1 parent c6cbd3a commit f0db428
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/live_cluster/client/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def get_nodes(
constants.NodeSelection.PRINCIPAL,
constants.NodeSelection.RANDOM,
]
| list[str],
| list[str] = constants.NodeSelection.ALL,
) -> list[Node]:
use_nodes = []

Expand Down
9 changes: 5 additions & 4 deletions lib/live_cluster/collectinfo_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import sys
import traceback
from typing import Any, Callable, Optional
from lib.live_cluster.client.node import Node
from lib.live_cluster.generate_config_controller import GenerateConfigController
from lib.utils.types import NodeDict

Expand Down Expand Up @@ -822,15 +823,15 @@ async def _dump_collectinfo_dynamic_aerospike_conf(self, as_logfile_prefix):
cluster. This will include changes that have not yet been save to the static
aerospike.conf file.
"""
ip_id_map = self.cluster.get_node_ids()
nodes: list[Node] = self.cluster.get_nodes()

async def _get_aerospike_conf(self, ip, id):
async def _get_aerospike_conf(self, key, id):
complete_filename = as_logfile_prefix + id + "_aerospike.conf"
line = f"-o {complete_filename} with {ip}"
line = f"-o {complete_filename} with {key}"
await GenerateConfigController().execute(line.split())

results = await asyncio.gather(
*[_get_aerospike_conf(self, ip, id) for ip, id in ip_id_map.items()],
*[_get_aerospike_conf(self, node.key, node.node_id) for node in nodes],
return_exceptions=True,
)

Expand Down
5 changes: 2 additions & 3 deletions test/e2e/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,12 @@ async def capture_separate_and_parse_output(rc, commands):


def get_collectinfo_path(cp: CompletedProcess, collectinfo_prefix: str):
collectinfo_path = None
for line in reversed(cp.stderr.splitlines()):
if collectinfo_prefix in line and line.startswith("INFO:"):
words = line.split()
for word in words:
if collectinfo_prefix in word:
print("Found collectinfo_prefix", collectinfo_path)
if collectinfo_prefix in word and ".tgz" in word:
print("Found collectinfo_prefix", word)
return word
raise Exception("Unable to find collectinfo path in output")

Expand Down

0 comments on commit f0db428

Please sign in to comment.