Skip to content

Commit

Permalink
Fix bug in get_recent_jobs_info of old tests
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Normandin <[email protected]>
  • Loading branch information
lebrice committed May 1, 2024
1 parent 48be5ff commit 3b43422
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/integration/test_slurm_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 3b43422

Please sign in to comment.