MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / test_max_fails_1

Function test_max_fails_1

tests/test_job.py:575–601  ·  view source on GitHub ↗
(hq_env: HqEnv)

Source from the content-addressed store, hash-verified

573
574
575def test_max_fails_1(hq_env: HqEnv):
576 hq_env.start_server()
577 hq_env.command(
578 [
579 "submit",
580 "--array",
581 "1-200",
582 "--stdout",
583 "none",
584 "--stderr",
585 "none",
586 "--max-fails",
587 "1",
588 "--",
589 "bash",
590 "-c",
591 "if [ $HQ_TASK_ID == 137 ]; then exit 1; fi",
592 ]
593 )
594 hq_env.start_workers(1)
595
596 wait_for_job_state(hq_env, 1, "FAILED")
597
598 table = hq_env.command(["job", "info", "1"], as_table=True)
599 states = table[0].get_row_value("State").split("\n")
600 assert "FAILED (1)" in states
601 assert "FINISHED (199)" in states
602
603
604def test_max_fails_many(hq_env: HqEnv):

Callers

nothing calls this directly

Calls 6

wait_for_job_stateFunction · 0.85
commandMethod · 0.80
get_row_valueMethod · 0.80
start_serverMethod · 0.45
start_workersMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected