mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 19:00:36 +08:00
[Core]Fix ray.kill doesn't cancel pending actor bug (#14025)
This commit is contained in:
@@ -59,6 +59,8 @@ public class KillActorTest extends BaseTest {
|
||||
|
||||
private void testKillActor(BiConsumer<ActorHandle<?>, Boolean> kill, boolean noRestart) {
|
||||
ActorHandle<HangActor> actor = Ray.actor(HangActor::new).setMaxRestarts(1).remote();
|
||||
// Wait for the actor to be created.
|
||||
actor.task(HangActor::ping).remote().get();
|
||||
ObjectRef<Boolean> result = actor.task(HangActor::hang).remote();
|
||||
// The actor will hang in this task.
|
||||
Assert.assertEquals(0, Ray.wait(ImmutableList.of(result), 1, 500).getReady().size());
|
||||
|
||||
Reference in New Issue
Block a user