Skip to content

Commit

Permalink
add logging test
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbyrne committed Jan 17, 2023
1 parent 924755b commit e2990f8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions stdlib/Distributed/test/distributed_exec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1876,6 +1876,18 @@ begin
end
end

# test logging
w = only(addprocs(1))
@test_logs (:info, "from pid $w") begin
prev_logger = global_logger(current_logger())
try
wait(@spawnat w @info("from pid $(myid())"))
finally
global_logger(prev_logger)
end
end
wait(rmprocs([w]))

# Run topology tests last after removing all workers, since a given
# cluster at any time only supports a single topology.
rmprocs(workers())
Expand Down

0 comments on commit e2990f8

Please sign in to comment.