File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1515,11 +1515,22 @@ def s(t):
1515
1515
assert r == (0 , 1 )
1516
1516
1517
1517
1518
+ class SleepActor (Actor ):
1519
+ @endpoint
1520
+ async def sleep (self , t : float ) -> None :
1521
+ await asyncio .sleep (t )
1522
+
1523
+
1518
1524
@pytest .mark .parametrize ("v1" , [True , False ])
1519
1525
def test_mesh_len (v1 : bool ):
1520
1526
proc_mesh = spawn_procs_on_fake_host (v1 , {"gpus" : 12 })
1521
- s = proc_mesh .spawn ("sync_actor " , SyncActor )
1527
+ s = proc_mesh .spawn ("sleep_actor " , SleepActor )
1522
1528
assert 12 == len (s )
1529
+ # FIXME: Actually figure out what's going on here.
1530
+ # Call an endpoint on the actor before the test
1531
+ # exits. Otherwise we might get a fatal PyGILState_Release
1532
+ # error.
1533
+ s .sleep .call (1 ).get ()
1523
1534
1524
1535
1525
1536
class UndeliverableMessageReceiver (Actor ):
You can’t perform that action at this time.
0 commit comments