Skip to content

Commit 18fc3d2

Browse files
committed
Workaround known 12.0.0 issue
Call GRBemptyenvinternal with the technical version number
1 parent 1752fd5 commit 18fc3d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/runtests.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ end
4242

4343
@testset "license_error" begin
4444
envptr = Ref{Ptr{Cvoid}}()
45-
error = @ccall libgurobi.GRBemptyenv(envptr::Ptr{Ptr{Cvoid}})::Cint
45+
# Temporary workaround for 12.0.0. This can be reverted to use GRBemptyenv for 12.0.1
46+
# https://docs.gurobi.com/projects/optimizer/en/12.0/reference/releasenotes/knownbugs.html
47+
error = @ccall libgurobi.GRBemptyenvinternal(envptr::Ptr{Ptr{Cvoid}}, 12, 0, 0)::Cint
4648
@test error == 0
4749
error = @ccall libgurobi.GRBstartenv(envptr[]::Ptr{Cvoid})::Cint
4850
@test error == 10009 || error == 0

0 commit comments

Comments
 (0)