mirror of
https://github.com/ANL-CEEESA/UnitCommitment.jl.git
synced 2025-12-06 16:28:51 -06:00
web: backend: minor fixes
This commit is contained in:
@@ -24,7 +24,7 @@ end
|
|||||||
function runtests()
|
function runtests()
|
||||||
@testset "UCJL Backend" begin
|
@testset "UCJL Backend" begin
|
||||||
server_test_usage()
|
server_test_usage()
|
||||||
# jobs_test_usage()
|
jobs_test_usage()
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -24,17 +24,13 @@ function jobs_test_usage()
|
|||||||
# Push job to queue
|
# Push job to queue
|
||||||
put!(processor, job_id)
|
put!(processor, job_id)
|
||||||
|
|
||||||
# Wait until all jobs are processed
|
# Stop worker (wait for jobs to finish)
|
||||||
while isbusy(processor)
|
sleep(0.1)
|
||||||
sleep(0.1)
|
stop(processor)
|
||||||
end
|
|
||||||
|
|
||||||
# Check that solution file exists
|
# Check that solution file exists
|
||||||
output_path = joinpath(job_dir, "output.json")
|
output_path = joinpath(job_dir, "output.json")
|
||||||
@test isfile(output_path)
|
@test isfile(output_path)
|
||||||
|
|
||||||
# Stop the worker
|
|
||||||
stop(processor)
|
|
||||||
finally
|
finally
|
||||||
# Cleanup
|
# Cleanup
|
||||||
rm(job_dir, recursive = true, force = true)
|
rm(job_dir, recursive = true, force = true)
|
||||||
|
|||||||
@@ -40,5 +40,5 @@ function server_test_usage()
|
|||||||
@test saved_data == compressed_data
|
@test saved_data == compressed_data
|
||||||
|
|
||||||
# Clean up: remove the job directory
|
# Clean up: remove the job directory
|
||||||
# rm(job_dir, recursive=true)
|
rm(job_dir, recursive=true)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user