Skip to content

Commit

Permalink
Fix CWL Workflow Slurm memory test (#5151)
Browse files Browse the repository at this point in the history
* Fix Slurm memory test

* fix unrelated typing error due to new version of psutil

---------

Co-authored-by: Michael R. Crusoe <[email protected]>
Co-authored-by: Adam Novak <[email protected]>
  • Loading branch information
3 people authored Nov 14, 2024
1 parent 46d24d9 commit 47ac7bf
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 @@ -526,7 +526,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 47ac7bf

Please sign in to comment.