Skip to content

Commit

Permalink
move Random to stdlib (#24874)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfourquet authored Jan 15, 2018
1 parent 1868628 commit 5438aef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/cluster.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,8 @@ function init_bind_addr()
LPROC.bind_port = UInt16(bind_port)
end

using Random: randstring

function init_parallel()
start_gc_msgs_task()
atexit(terminate_all_workers)
Expand Down
5 changes: 2 additions & 3 deletions test/distributed_exec.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

using Test, Distributed
using Test, Distributed, Random
import Distributed: launch, manage

include(joinpath(Sys.BINDIR, "..", "share", "julia", "test", "testenv.jl"))
Expand All @@ -18,7 +18,7 @@ include(joinpath(Sys.BINDIR, "..", "share", "julia", "test", "testenv.jl"))
addprocs_with_testenv(4)
@test nprocs() == 5

@everywhere using Test
@everywhere using Test, Random

id_me = myid()
id_other = filter(x -> x != id_me, procs())[rand(1:(nprocs()-1))]
Expand Down Expand Up @@ -1498,4 +1498,3 @@ end
# cluster at any time only supports a single topology.
rmprocs(workers())
include("topology.jl")

2 changes: 2 additions & 0 deletions test/topology.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

using Random

pids = addprocs_with_testenv(4; topology="master_worker")

let p1 = pids[1], p2 = pids[2]
Expand Down

0 comments on commit 5438aef

Please sign in to comment.