mirror of
https://github.com/wassname/ray.git
synced 2026-07-04 08:11:44 +08:00
[Placement Group] Remove warning msg for placement groups. (#11034)
* Done. * Addressed code review. * Fixed typo. * Addressed code review.
This commit is contained in:
@@ -8,7 +8,8 @@ except ImportError:
|
||||
pytest_timeout = None
|
||||
|
||||
import ray
|
||||
from ray.test_utils import get_other_nodes, wait_for_condition
|
||||
from ray.test_utils import (get_other_nodes, wait_for_condition,
|
||||
get_error_message)
|
||||
import ray.cluster_utils
|
||||
from ray._raylet import PlacementGroupID
|
||||
from ray.util.placement_group import (PlacementGroup,
|
||||
@@ -846,5 +847,17 @@ def test_capture_child_tasks(ray_start_cluster):
|
||||
assert len(node_id_set) == 1
|
||||
|
||||
|
||||
def test_ready_warning_suppressed(ray_start_regular, error_pubsub):
|
||||
p = error_pubsub
|
||||
# Create an infeasible pg.
|
||||
pg = ray.util.placement_group([{"CPU": 2}] * 2, strategy="STRICT_PACK")
|
||||
with pytest.raises(ray.exceptions.GetTimeoutError):
|
||||
ray.get(pg.ready(), timeout=0.5)
|
||||
|
||||
errors = get_error_message(
|
||||
p, 1, ray.ray_constants.INFEASIBLE_TASK_ERROR, timeout=0.1)
|
||||
assert len(errors) == 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(pytest.main(["-v", __file__]))
|
||||
|
||||
Reference in New Issue
Block a user