Skip to content

Commit

Permalink
Merge branch 'main' into interrupt-windows-1
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Sep 27, 2023
2 parents 7971b7a + b673724 commit 18725fb
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions test/basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,28 @@
@testset "Worker management" begin
w = W()
@test m.isrunning(w) === true
@test m.remote_call_fetch(&, w, true, true)

W === m.Worker && @test length(m.__iNtErNaL_get_running_procs()) == 1
# Terminating workers takes about 0.5s
m.stop(w)

if W === m.InProcessWorker
m.stop(w)
else
start = time()
task = m.remote_call(sleep, w, 10)

m.stop(w)

@test try
wait(task)
catch e
e
end isa TaskFailedException
stop = time()
@test stop - start < 8
end


@test m.isrunning(w) === false
W === m.Worker && @test length(m.__iNtErNaL_get_running_procs()) == 0
end
Expand Down

0 comments on commit 18725fb

Please sign in to comment.