Skip to content

Commit

Permalink
Merge pull request #118 from JuliaLang/racey-tests
Browse files Browse the repository at this point in the history
Fix a race condition in the tests
  • Loading branch information
JamesWrigley authored Jan 15, 2025
2 parents 51fe0e4 + f9d3d89 commit 3b9e4fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/distributed_exec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,9 @@ let wid1 = workers()[1],

put!(fstore, rr)
if include_thread_unsafe_tests()
@test remotecall_fetch(k -> haskey(Distributed.PGRP.refs, k), wid1, rrid) == true
# timedwait() is necessary because wid1 is asynchronously informed of
# the existence of rr/rrid through the call to `put!(fstore, rr)`.
@test timedwait(() -> remotecall_fetch(k -> haskey(Distributed.PGRP.refs, k), wid1, rrid), 10) === :ok
end
finalize(rr) # finalize locally
yield() # flush gc msgs
Expand Down

0 comments on commit 3b9e4fd

Please sign in to comment.