Skip to content

Commit 6a07d98

Browse files
authored
Merge pull request #93 from JuliaLang/ib/guard_rmprocs
Guard rmprocs in tests to avoid warning. Fix leaky stderr from SIGTERM test.
2 parents 8c03305 + 41cd14f commit 6a07d98

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

test/distributed_exec.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,7 +1906,7 @@ end end
19061906
include("splitrange.jl")
19071907

19081908
# Clear all workers for timeout tests (issue #45785)
1909-
rmprocs(workers())
1909+
nprocs() > 1 && rmprocs(workers())
19101910
begin
19111911
# First, assert that we get no messages when we close a cooperative worker
19121912
w = only(addprocs(1))
@@ -1920,12 +1920,14 @@ begin
19201920
remote_do(w) do
19211921
# Cause the 'exit()' message that `rmprocs()` sends to do nothing
19221922
Core.eval(Base, :(exit() = nothing))
1923+
# Hide the trace that `rmprocs()` will cause this worker to show
1924+
redirect_stderr(devnull)
19231925
end
19241926
wait(rmprocs([w]))
19251927
end
19261928
end
19271929

19281930
# Run topology tests last after removing all workers, since a given
19291931
# cluster at any time only supports a single topology.
1930-
rmprocs(workers())
1932+
nprocs() > 1 && rmprocs(workers())
19311933
include("topology.jl")

test/topology.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ for (i, (from,to)) in enumerate(combinations)
134134
end
135135

136136
# With lazy=false, all connections ought to be setup during `addprocs`
137-
rmprocs(workers())
137+
nprocs() > 1 && rmprocs(workers())
138138
addprocs_with_testenv(8; lazy=false)
139139
def_count_conn()
140140
@test sum(asyncmap(p->remotecall_fetch(count_connected_workers,p), workers())) == 64

0 commit comments

Comments
 (0)