diff --git a/python/ray/tests/test_actor.py b/python/ray/tests/test_actor.py index 5ad05e800..f29d1f548 100644 --- a/python/ray/tests/test_actor.py +++ b/python/ray/tests/test_actor.py @@ -905,6 +905,30 @@ def test_actor_load_balancing(ray_start_cluster): ray.get(results) +@pytest.mark.skipif( + pytest_timeout is None, + reason="Timeout package not installed; skipping test that may hang.") +@pytest.mark.timeout(10) +def test_actor_lifetime_load_balancing(ray_start_cluster): + cluster = ray_start_cluster + cluster.add_node(num_cpus=0) + num_nodes = 3 + for i in range(num_nodes): + cluster.add_node(num_cpus=1) + ray.init(redis_address=cluster.redis_address) + + @ray.remote(num_cpus=1) + class Actor(object): + def __init__(self): + pass + + def ping(self): + return + + actors = [Actor.remote() for _ in range(num_nodes)] + ray.get([actor.ping.remote() for actor in actors]) + + @pytest.mark.skipif( os.environ.get("RAY_USE_NEW_GCS") == "on", reason="Failing with new GCS API on Linux.")