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