Skip to content

Commit fd2ad7a

Browse files
authored
Distributed: fix warning generated by test (JuliaLang/julia#33746)
1 parent bcc15d7 commit fd2ad7a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/distributed_exec.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,10 +1566,11 @@ end
15661566

15671567
# Issue # 22865
15681568
# Must be run on a new cluster, i.e., all workers must be in the same state.
1569-
rmprocs(workers())
1569+
@assert nprocs() == 1
15701570
p1,p2 = addprocs_with_testenv(2)
15711571
@everywhere f22865(p) = remotecall_fetch(x->x.*2, p, fill(1.,2))
15721572
@test fill(2.,2) == remotecall_fetch(f22865, p1, p2)
1573+
rmprocs(p1, p2)
15731574

15741575
function reuseport_tests()
15751576
# Run the test on all processes.
@@ -1606,9 +1607,9 @@ end
16061607

16071608
# Test that the client port is reused. SO_REUSEPORT may not be supported on
16081609
# all UNIX platforms, Linux kernels prior to 3.9 and older versions of OSX
1610+
@assert nprocs() == 1
1611+
addprocs_with_testenv(4; lazy=false)
16091612
if ccall(:jl_has_so_reuseport, Int32, ()) == 1
1610-
rmprocs(workers())
1611-
addprocs_with_testenv(4; lazy=false)
16121613
reuseport_tests()
16131614
else
16141615
@info "SO_REUSEPORT is unsupported, skipping reuseport tests"

0 commit comments

Comments
 (0)