Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion python/tests/test_python_actors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1515,11 +1515,22 @@ def s(t):
assert r == (0, 1)


class SleepActor(Actor):
@endpoint
async def sleep(self, t: float) -> None:
await asyncio.sleep(t)


@pytest.mark.parametrize("v1", [True, False])
def test_mesh_len(v1: bool):
proc_mesh = spawn_procs_on_fake_host(v1, {"gpus": 12})
s = proc_mesh.spawn("sync_actor", SyncActor)
s = proc_mesh.spawn("sleep_actor", SleepActor)
assert 12 == len(s)
# FIXME: Actually figure out what's going on here.
# Call an endpoint on the actor before the test
# exits. Otherwise we might get a fatal PyGILState_Release
# error.
s.sleep.call(1).get()


class UndeliverableMessageReceiver(Actor):
Expand Down