(hq_env: HqEnv)
| 8 | |
| 9 | |
| 10 | def test_stream_collision(hq_env: HqEnv): |
| 11 | os.mkdir("mylog") |
| 12 | for i in range(2): |
| 13 | print(f"Run {i}") |
| 14 | hq_env.start_server() |
| 15 | hq_env.command( |
| 16 | [ |
| 17 | "submit", |
| 18 | "--stream", |
| 19 | "mylog", |
| 20 | "--array=1-20", |
| 21 | "--", |
| 22 | "bash", |
| 23 | "-c", |
| 24 | "echo Hello from ${HQ_TASK_ID}", |
| 25 | ] |
| 26 | ) |
| 27 | hq_env.start_workers(2, cpus="2") |
| 28 | wait_for_job_state(hq_env, 1, "FINISHED") |
| 29 | hq_env.stop_server() |
| 30 | time.sleep(1) |
| 31 | |
| 32 | print(hq_env.command(["output-log", "mylog", "show"], expect_fail="Found streams from multiple server instances")) |
| 33 | |
| 34 | |
| 35 | def test_stream_submit(hq_env: HqEnv): |
nothing calls this directly
no test coverage detected