Skip to content

Commit 7ef640a

Browse files
author
Theofilos Manitaras
committed
Handle the case where the scheduler does not retrieve exitcode
1 parent 119dc2b commit 7ef640a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

unittests/test_schedulers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,9 @@ def test_submit(make_job, exec_ctx):
406406
num_tasks_per_node = minimal_job.num_tasks_per_node or 1
407407
num_nodes = minimal_job.num_tasks // num_tasks_per_node
408408
assert num_nodes == len(minimal_job.nodelist)
409-
assert 0 == minimal_job.exitcode
409+
410+
# Handle the case where the exitcode was not reported by the scheduler
411+
assert minimal_job.exitcode is None or 0 == minimal_job.exitcode
410412

411413
with open(minimal_job.stderr) as stderr:
412414
assert not stderr.read().strip()

0 commit comments

Comments
 (0)