|
158 | 158 | end |
159 | 159 | end |
160 | 160 | job_killed = JuliaHub.job(job_killed) # test default auth= |
161 | | - @test job_killed.status == "Stopped" |
| 161 | + @test test_job_done_and_not_failed(job_killed, "Stopped") |
162 | 162 | # wait for the logger task to finish, if hasn't already |
163 | 163 | JuliaHub.interrupt!(logbuffer; wait=true) |
164 | 164 |
|
|
218 | 218 | auth, alias="distributed", |
219 | 219 | ) |
220 | 220 | job = JuliaHub.wait_job(job) |
221 | | - @test job.status == "Completed" |
| 221 | + @test test_job_done_and_not_failed(job, "Completed") |
222 | 222 | @test !isempty(job.results) |
223 | 223 | let results = JSON.parse(job.results) |
224 | 224 | @test results isa AbstractDict |
|
244 | 244 | @test job.alias == full_alias |
245 | 245 | @test job.env["FOO"] == "bar" |
246 | 246 | job = JuliaHub.wait_job(job) |
247 | | - @test job.status == "Completed" |
| 247 | + @test test_job_done_and_not_failed(job, "Completed") |
248 | 248 | @test !isempty(job.results) |
249 | 249 | let results = JSON.parse(job.results) |
250 | 250 | @test results isa AbstractDict |
|
266 | 266 | auth, alias="scripts-1", |
267 | 267 | ) |
268 | 268 | job = JuliaHub.wait_job(job) |
269 | | - @test job.status == "Completed" |
| 269 | + @test test_job_done_and_not_failed(job, "Completed") |
270 | 270 | @test !isempty(job.results) |
271 | 271 | let results = JSON.parse(job.results) |
272 | 272 | @test results isa AbstractDict |
|
286 | 286 | auth, alias="scripts-2", |
287 | 287 | ) |
288 | 288 | job = JuliaHub.wait_job(job) |
289 | | - @test job.status == "Completed" |
| 289 | + @test test_job_done_and_not_failed(job, "Completed") |
290 | 290 | @test !isempty(job.results) |
291 | 291 | let results = JSON.parse(job.results) |
292 | 292 | @test results isa AbstractDict |
|
307 | 307 | auth, alias="appbundle", |
308 | 308 | ) |
309 | 309 | job = JuliaHub.wait_job(job) |
310 | | - @test job.status == "Completed" |
| 310 | + @test test_job_done_and_not_failed(job, "Completed") |
311 | 311 | # Check input and output files |
312 | 312 | @test length(JuliaHub.job_files(job, :input)) >= 2 |
313 | 313 | @test JuliaHub.job_file(job, :input, "code.jl") isa JuliaHub.JobFile |
|
345 | 345 | """noenv; alias="output-file" |
346 | 346 | ) |
347 | 347 | job = JuliaHub.wait_job(job) |
348 | | - @test job.status == "Completed" |
| 348 | + @test test_job_done_and_not_failed(job, "Completed") |
349 | 349 | # Project.toml, Manifest.toml, code.jl |
350 | 350 | @test length(JuliaHub.job_files(job, :input)) >= 1 |
351 | 351 | @test JuliaHub.job_file(job, :input, "code.jl") isa JuliaHub.JobFile |
|
380 | 380 | """noenv; alias="output-file-tarball" |
381 | 381 | ) |
382 | 382 | job = JuliaHub.wait_job(job) |
383 | | - @test job.status == "Completed" |
| 383 | + @test test_job_done_and_not_failed(job, "Completed") |
384 | 384 | @test length(JuliaHub.job_files(job, :project)) >= 1 |
385 | 385 | result_tarball = only(JuliaHub.job_files(job, :result)) |
386 | 386 | buf = IOBuffer() |
|
421 | 421 | ); auth, alias="sysimage" |
422 | 422 | ) |
423 | 423 | job = JuliaHub.wait_job(job) |
424 | | - @test job.status == "Completed" |
| 424 | + @test test_job_done_and_not_failed(job, "Completed") |
425 | 425 | @test job._json["sysimage_build"] === true |
426 | 426 | @test !isempty(job.results) |
427 | 427 | let results = JSON.parse(job.results) |
|
0 commit comments