Skip to content

Commit 5332946

Browse files
vtjnashKeno
authored andcommitted
Distributed: fix cluster used by JuliaLang/julia#34886 test
The test added in JuliaLang/julia#34886 was using the wrong cluster, resulting in test failures after the cluster was shutdown at the end of `runtests`. Move it to the isolation cluster.
1 parent 9214e78 commit 5332946

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

test/distributed_exec.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,6 +1673,8 @@ let (h, t) = Distributed.head_and_tail(Int[], 0)
16731673
@test collect(t) == []
16741674
end
16751675

1676+
include("splitrange.jl")
1677+
16761678
# Run topology tests last after removing all workers, since a given
16771679
# cluster at any time only supports a single topology.
16781680
rmprocs(workers())

test/runtests.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ if !success(pipeline(cmd; stdout=stdout, stderr=stderr)) && ccall(:jl_running_on
1111
error("Distributed test failed, cmd : $cmd")
1212
end
1313

14-
include("macros.jl")
1514
include("managers.jl")

test/macros.jl renamed to test/splitrange.jl

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ using Test
22
using Distributed
33
using Distributed: splitrange
44

5-
# testing function macros.jl:splitrange
65
@test splitrange(1, 11, 1) == Array{UnitRange{Int64},1}([1:11])
76
@test splitrange(0, 10, 1) == Array{UnitRange{Int64},1}([0:10])
87
@test splitrange(-1, 9, 1) == Array{UnitRange{Int64},1}([-1:9])
@@ -26,11 +25,7 @@ const BASE_TEST_PATH = joinpath(Sys.BINDIR, "..", "share", "julia", "test")
2625
isdefined(Main, :OffsetArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "OffsetArrays.jl"))
2726
using .Main.OffsetArrays
2827

29-
oa=OffsetArray([-1,0], (-2,))
30-
@distributed for i in eachindex(oa)
31-
@test i <= 0
28+
oa = OffsetArray([123, -345], (-2,))
29+
@sync @distributed for i in eachindex(oa)
30+
@test i (-1, 0)
3231
end
33-
34-
# testing macros.jl:...
35-
# ... yet to be implemented
36-

0 commit comments

Comments
 (0)