Skip to content

Commit

Permalink
Fix neos_emailJobResults (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Aug 22, 2024
1 parent 8af0480 commit 882062f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/NEOSServer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,14 @@ function neos_getFinalResults(s::Server, j::Job)
return _decode_to_string(ret[1])
end

function neos_emailFinalResults(s::Server, j::Job)
return _api_method(s, "emailFinalresults", j.number, j.password)
function neos_emailJobResults(s::Server, j::Job)
return _api_method(s, "emailJobResults", j.number, j.password)
end

# neos_emailFinalResults was included in v1.x, but never tested, and it should
# hhave been neos_emailJobResults. I don't know when this changed in NEOS.
@deprecate neos_emailFinalResults neos_emailJobResults

function neos_getIntermediateResults(s::Server, j::Job, offset::Int)
ret = _api_method(s, "getIntermediateResults", j.number, j.password, offset)
return _decode_to_string(ret[1]), parse(Int, ret[2])
Expand Down
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ function test_Optimizer()
@test offset > 0
@test occursin("ipopt", neos_getFinalResults(server, job))
@test occursin("ipopt", neos_getFinalResultsNonBlocking(server, job))
ret = neos_emailJobResults(server, job)
@test occursin(EMAIL, only(ret))
ret = neos_emailFinalResults(server, job)
@test occursin(EMAIL, only(ret))
return
end

Expand Down

0 comments on commit 882062f

Please sign in to comment.