8000 cover _EagerActorFuture.__await__ · dask/distributed@f2fbc8a · GitHub
[go: up one dir, main page]

Skip to content

Commit f2fbc8a

Browse files
committed
cover _EagerActorFuture.__await__
1 parent 80141f1 commit f2fbc8a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

distributed/tests/test_actor.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,21 @@ def do_inc(self, ac):
637637
assert ac2.do_inc(ac).result() == 1
638638

639639

640+
def test_one_thread_deadlock_sync_client():
641+
class UsesCounter:
642+
# An actor whose method argument is another actor
643+
644+
def do_inc(self, ac):
645+
get_client().sync(ac.increment)
646+
647+
with cluster(nworkers=2) as (cl, w):
648+
client = Client(cl["address"])
649+
ac = client.submit(Counter, actor=True).result()
650+
ac2 = client.submit(UsesCounter, actor=True, workers=[ac._address]).result()
651+
652+
assert ac2.do_inc(ac).result() == 1
653+
654+
640655
@gen_cluster(client=True)
641656
async def test_async_deadlock(client, s, a, b):
642657
class UsesCounter:

0 commit comments

Comments
 (0)
0