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

Function test_custom_error_message

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

Source from the content-addressed store, hash-verified

967
968
969def test_custom_error_message(hq_env: HqEnv):
970 hq_env.start_server()
971 hq_env.start_worker()
972
973 hq_env.command(
974 [
975 "submit",
976 "--task-dir",
977 "--",
978 "bash",
979 "-c",
980 # "echo $HQ_ERROR",
981 "echo 'Testing message' > \"${HQ_ERROR_FILENAME}\"; exit 1",
982 ]
983 )
984 wait_for_job_state(hq_env, 1, "FAILED")
985
986 table = hq_env.command(["task", "list", "1", "-v"], as_table=True)
987 assert table.get_column_value("Error")[0] == "Testing message"
988 # print(table)
989
990
991def test_long_custom_error_message(hq_env: HqEnv):

Callers

nothing calls this directly

Calls 5

wait_for_job_stateFunction · 0.85
commandMethod · 0.80
get_column_valueMethod · 0.80
start_serverMethod · 0.45
start_workerMethod · 0.45

Tested by

no test coverage detected