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

Function test_single_dep

tests/pyapi/test_dependencies.py:9–20  ·  view source on GitHub ↗

Check that the second task does not start computing before the first one.

(hq_env: HqEnv)

Source from the content-addressed store, hash-verified

7
8
9def test_single_dep(hq_env: HqEnv):
10 """
11 Check that the second task does not start computing before the first one.
12 """
13 (job, client) = prepare_job_client(hq_env, with_worker=False)
14 hq_env.start_worker(cpus=2)
15
16 t1 = job.program(args=bash("sleep 1; echo 'hello' > foo.txt"))
17 job.program(args=bash("cat foo.txt"), deps=[t1])
18 submitted_job = client.submit(job)
19
20 wait_for_job_state(hq_env, submitted_job.id, "FINISHED")
21
22
23def test_dep_failed(hq_env: HqEnv):

Callers

nothing calls this directly

Calls 6

prepare_job_clientFunction · 0.85
bashFunction · 0.85
wait_for_job_stateFunction · 0.85
programMethod · 0.80
start_workerMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected