Skip to content

Commit

Permalink
Fix Slurm memory test
Browse files Browse the repository at this point in the history
  • Loading branch information
gmloose committed Nov 8, 2024
1 parent f71dc86 commit 9f7e754
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/toil/test/cwl/cwlTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,12 @@ def test_slurm_node_memory(self) -> None:
log.debug("Workflow output: %s", out)
memory_string = out["memory"]
log.debug("Observed memory: %s", memory_string)
result = int(memory_string)
# If there's no memory limit enforced, Slurm will return "unlimited".
# Set result to something sensible.
if memory_string.strip() == "unlimited":
result = 4 * 1024 * 1024
else:
result = int(memory_string)
# We should see more than the CWL default or the Toil default, assuming Slurm nodes of reasonable size (3 GiB).
self.assertGreater(result, 3 * 1024 * 1024)

Expand Down

0 comments on commit 9f7e754

Please sign in to comment.