From 3366efd31fefb8e9c1dc8d6e2a0db76cab00d396 Mon Sep 17 00:00:00 2001 From: Fabrice Normandin Date: Wed, 1 May 2024 13:49:39 -0400 Subject: [PATCH] Fix bug in `get_recent_jobs_info` of old tests Signed-off-by: Fabrice Normandin --- tests/integration/test_slurm_remote.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/integration/test_slurm_remote.py b/tests/integration/test_slurm_remote.py index e2acdf76..7fd174e9 100644 --- a/tests/integration/test_slurm_remote.py +++ b/tests/integration/test_slurm_remote.py @@ -69,13 +69,14 @@ def get_recent_jobs_info( # otherwise this would launch a job! assert not isinstance(login_node, SlurmRemote) lines = login_node.run( - f"sacct --noheader --allocations " + f"sacct --noheader --allocations --user=$USER " f"--starttime=now-{int(since.total_seconds())}seconds " - "--format=" + ",".join(f"{field}%40" for field in fields), - display=True, + "--format=" + ",".join(f"{field}%100" for field in fields), + display=False, + hide=True, ).stdout.splitlines() # note: using maxsplit because the State field can contain spaces: "canceled by ..." - return [tuple(line.strip().split(maxsplit=len(fields))) for line in lines] + return [tuple(line.strip().split(maxsplit=len(fields) - 1)) for line in lines] def sleep_so_sacct_can_update():