Skip to content

Commit 92ced06

Browse files
committed
Allow both E and F states for a killed OpenPBS job
E is a transitional state, and it will later progress to F when the queue system is done with it. In this test we pick up either E or F depending on star alignment.
1 parent 57d74db commit 92ced06

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/ert/unit_tests/scheduler/test_openpbs_driver.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,10 @@ async def test_that_queue_system_can_kill_before_scheduler_with_negative_padding
658658
stdout_content: dict[str, dict] = json.loads(stdout.decode(errors="ignore"))
659659
job = stdout_content.get("Jobs", {}).get(job_id, {})
660660
assert job is not None, "Job not found in qstat output"
661-
assert job.get("job_state") == "F", "The job was not marked as failed"
661+
job_state = job.get("job_state")
662+
assert job_state in {"E", "F"}, (
663+
f"Expected job state to be 'E' (exiting) or 'F' (failed), got {job_state}"
664+
)
662665
assert job.get("Resource_List", {}).get("walltime") == "00:00:00", (
663666
"Wall time was not propagated correctly"
664667
)

0 commit comments

Comments
 (0)