Skip to content

Commit

Permalink
fix failing enable_finalizers test
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Jan 20, 2021
1 parent 5f10eb9 commit 43c7d02
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/misc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ for l in (Threads.SpinLock(), ReentrantLock())
@test get_finalizers_inhibited() == 1
GC.enable_finalizers(true)
@test get_finalizers_inhibited() == 0
@test_warn "WARNING: GC finalizers already enabled on this thread." GC.enable_finalizers(true)
if ccall(:jl_is_debugbuild, Cint, ()) != 0
# Note this warning only exists in debug builds
@test_warn "WARNING: GC finalizers already enabled on this thread." GC.enable_finalizers(true)
end

@test lock(l) === nothing
@test try unlock(l) finally end === nothing
Expand Down

0 comments on commit 43c7d02

Please sign in to comment.