diff --git a/test/common_interface/callbacks.jl b/test/common_interface/callbacks.jl index 4f5c993..ff540e8 100644 --- a/test/common_interface/callbacks.jl +++ b/test/common_interface/callbacks.jl @@ -55,7 +55,7 @@ function condition2(u, t, integrator) end affect2!(integrator) = terminate!(integrator) times_finalize_called = 0 -cb = DiscreteCallback(condition2, affect2!, finalize=(args...)->times_finalize_called+=1) +cb = DiscreteCallback(condition2, affect2!, finalize=(args...)->global times_finalize_called+=1) sol = solve(prob, CVODE_BDF(); callback = cb) @test sol.t[end] < 3.5 @test times_finalize_called = 1