diff --git a/stdlib/Distributed/test/distributed_exec.jl b/stdlib/Distributed/test/distributed_exec.jl index c3eca69bb5268..270f1a6125c84 100644 --- a/stdlib/Distributed/test/distributed_exec.jl +++ b/stdlib/Distributed/test/distributed_exec.jl @@ -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())