Skip to content

Commit fda6c39

Browse files
add basic tests for both methods
1 parent 689e306 commit fda6c39

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/distributed_exec.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,8 @@ wp = WorkerPool(workers())
718718
@test nworkers() == length(unique(remotecall_fetch(wp->pmap(_->myid(), wp, 1:100), id_other, wp)))
719719
wp = WorkerPool(2:3)
720720
@test sort(unique(pmap(_->myid(), wp, 1:100))) == [2,3]
721+
@test fetch(remotecall(myid, wp)) in wp.workers
722+
@test_throws RemoteException fetch(remotecall(error, wp))
721723

722724
# wait on worker pool
723725
wp = WorkerPool(2:2)
@@ -743,6 +745,8 @@ status = timedwait(() -> isready(f), 10)
743745
# CachingPool tests
744746
wp = CachingPool(workers())
745747
@test [1:100...] == pmap(x->x, wp, 1:100)
748+
@test fetch(remotecall(myid, wp)) in wp.workers
749+
@test_throws RemoteException fetch(remotecall(error, wp))
746750

747751
clear!(wp)
748752
@test length(wp.map_obj2ref) == 0

0 commit comments

Comments
 (0)