Skip to content

Commit a7d9075

Browse files
Revert "[Test] Remove validation of Torque wrapper from slurm tests."
This reverts commit 699cb16.
1 parent 358d18c commit a7d9075

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
wait_for_num_nodes_in_scheduler,
5757
)
5858
from tests.common.scaling_common import setup_ec2_launch_override_to_emulate_ice
59-
from tests.common.schedulers_common import SlurmCommands
59+
from tests.common.schedulers_common import SlurmCommands, TorqueCommands
6060

6161

6262
@pytest.mark.usefixtures("instance", "os")
@@ -120,6 +120,8 @@ def test_slurm(
120120
max_count=5,
121121
gpu_instance_type_info=gpu_instance_type_info,
122122
)
123+
# Test torque command wrapper
124+
_test_torque_job_submit(remote_command_executor, test_datadir)
123125

124126
# Tests below must run on HeadNode or need HeadNode participate.
125127
head_node_command_executor = RemoteCommandExecutor(cluster)
@@ -239,6 +241,8 @@ def test_slurm_from_login_nodes_in_private_network(
239241
max_count=5,
240242
gpu_instance_type_info=gpu_instance_type_info,
241243
)
244+
# Test torque command wrapper
245+
_test_torque_job_submit(remote_command_executor, test_datadir)
242246
head_node_command_executor = RemoteCommandExecutor(cluster)
243247
assert_no_errors_in_logs(head_node_command_executor, "slurm")
244248

@@ -1805,6 +1809,14 @@ def _assert_job_state(slurm_commands, job_id, job_state):
18051809
assert_that(e.result.stdout).contains("slurm_load_jobs error: Invalid job id specified")
18061810

18071811

1812+
def _test_torque_job_submit(remote_command_executor, test_datadir):
1813+
"""Test torque job submit command in slurm cluster."""
1814+
logging.info("Testing cluster submits job by torque command")
1815+
torque_commands = TorqueCommands(remote_command_executor)
1816+
result = torque_commands.submit_script(str(test_datadir / "torque_job.sh"))
1817+
torque_commands.assert_job_submitted(result.stdout)
1818+
1819+
18081820
def _submit_kill_networking_job(remote_command_executor, scheduler_commands, partition, node_type, num_nodes):
18091821
"""Submit job that will detach network interface on compute."""
18101822
# Get network interface name from Head node, assuming Head node and Compute are of the same instance type
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
echo "qsub executed successfully"

0 commit comments

Comments
 (0)