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

Function test_fractional_force_compact

tests/test_resources.py:596–603  ·  view source on GitHub ↗
(hq_env: HqEnv)

Source from the content-addressed store, hash-verified

594
595
596def test_fractional_force_compact(hq_env: HqEnv):
597 hq_env.start_server()
598 hq_env.command(["submit", "--priority=10", "--array=1-100", "--cpus", "0.3 compact!", "--", "sleep", "0"])
599 hq_env.command(["submit", "--cpus", "2.5 compact!", "--", "bash", "-c", "echo $HQ_CPUS"])
600
601 hq_env.start_worker(cpus="[[1, 2], [11, 12], [21, 22]]")
602 wait_for_job_state(hq_env, [1, 2], "FINISHED")
603 assert groups(2) == [1, 2]
604
605
606def test_fractions_blocked(hq_env: HqEnv):

Callers

nothing calls this directly

Calls 5

wait_for_job_stateFunction · 0.85
commandMethod · 0.80
groupsFunction · 0.70
start_serverMethod · 0.45
start_workerMethod · 0.45

Tested by

no test coverage detected