Skip to content

Commit 30adbc5

Browse files
hanwen-clusterhanwen-pcluste
authored andcommitted
Integ-tests: Reduce sporadic failures of test_scontrol_reboot
Signed-off-by: Hanwen <[email protected]>
1 parent fac8e67 commit 30adbc5

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tests/integration-tests/tests/schedulers/test_slurm.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ def test_scontrol_reboot(
443443
slurm_commands,
444444
["queue1-dy-t2micro-1", "queue1-dy-t2micro-2"],
445445
"idle",
446+
stop_max_delay_secs=330,
446447
)
447448

448449
# Test that idle static and dynamic nodes can be rebooted
@@ -2039,13 +2040,15 @@ def _test_scontrol_reboot_powerdown_reboot_requested_node(
20392040
jiff = 2
20402041

20412042
# Submit a job on the node to have it allocated
2042-
slurm_commands.submit_command(
2043-
command="sleep 120",
2044-
nodes=1,
2045-
slots=1,
2046-
other_options=f"-w {node}",
2043+
job_id = slurm_commands.submit_command_and_assert_job_accepted(
2044+
submit_command_args={
2045+
"command": "sleep 120",
2046+
"nodes": 1,
2047+
"slots": 1,
2048+
"other_options": f"-w {node}",
2049+
},
20472050
)
2048-
time.sleep(jiff)
2051+
slurm_commands.wait_job_running(job_id)
20492052
assert_compute_node_states(slurm_commands, [node], ["allocated", "mixed"])
20502053

20512054
# Request node reboot

0 commit comments

Comments
 (0)