Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,30 @@ def test_slurm_accounting(
cluster = clusters_factory(cluster_config)

remote_command_executor = RemoteCommandExecutor(cluster)
scheduler_commands = scheduler_commands_factory(remote_command_executor)

_test_that_slurmdbd_is_not_running(remote_command_executor)

job_1_id = scheduler_commands.submit_command_and_assert_job_accepted(
submit_command_args={
"command": "srun sleep 3000",
"nodes": 10,
"other_options": "--exclusive",
}
)

job_2_id = scheduler_commands.submit_command_and_assert_job_accepted(
submit_command_args={
"command": "srun sleep 3000",
"nodes": 10,
"other_options": "--exclusive",
}
)

scheduler_commands.wait_job_running(job_1_id)
scheduler_commands.assert_job_state(job_1_id, "RUNNING")
scheduler_commands.assert_job_state(job_2_id, "PENDING")

# Then update the cluster to enable Slurm Accounting
updated_config_file = pcluster_config_reader(
config_file="pcluster.config.update.yaml",
Expand All @@ -195,6 +216,11 @@ def test_slurm_accounting(
remote_command_executor = RemoteCommandExecutor(cluster)
scheduler_commands = scheduler_commands_factory(remote_command_executor)

scheduler_commands.assert_job_state(job_1_id, "RUNNING")
scheduler_commands.assert_job_state(job_2_id, "PENDING")
scheduler_commands.cancel_job(job_1_id)
scheduler_commands.cancel_job(job_2_id)

_test_that_slurmdbd_is_running(remote_command_executor)
_test_successful_startup_in_log(remote_command_executor)
_test_slurmdbd_log_exists_in_log_group(cluster)
Expand Down
Loading