[Placement group] Warm up the cluster before running the unit test #19286 (#19286)

This commit is contained in:
SangBin Cho 2021-10-12 08:26:52 +09:00 committed by GitHub
parent 2d0355548e
commit 0d7a7a06c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -345,6 +345,13 @@ def test_remove_placement_group(ray_start_cluster, connect_to_client):
cluster.add_node(num_cpus=4) cluster.add_node(num_cpus=4)
ray.init(address=cluster.address) ray.init(address=cluster.address)
@ray.remote
def warmup():
pass
# warm up the cluster.
ray.get([warmup.remote() for _ in range(4)])
with connect_to_client_or_not(connect_to_client): with connect_to_client_or_not(connect_to_client):
# First try to remove a placement group that doesn't # First try to remove a placement group that doesn't
# exist. This should not do anything. # exist. This should not do anything.