[New scheduler] Fix test_global_state (#12586)

This commit is contained in:
Alex Wu
2020-12-11 21:47:01 -08:00
committed by GitHub
parent 03d869d51c
commit aa64cd4534
8 changed files with 208 additions and 16 deletions
+4 -3
View File
@@ -144,7 +144,6 @@ def test_global_state_actor_entry(ray_start_regular):
@pytest.mark.parametrize("max_shapes", [0, 2, -1])
@pytest.mark.skipif(new_scheduler_enabled(), reason="broken")
def test_load_report(shutdown_only, max_shapes):
resource1 = "A"
resource2 = "B"
@@ -196,6 +195,8 @@ def test_load_report(shutdown_only, max_shapes):
if max_shapes != -1:
assert len(checker.report) <= max_shapes
print(checker.report)
if max_shapes > 0:
# Check that we always include the 1-CPU resource shape.
one_cpu_shape = {"CPU": 1}
@@ -216,7 +217,8 @@ def test_load_report(shutdown_only, max_shapes):
global_state_accessor.disconnect()
@pytest.mark.skipif(new_scheduler_enabled(), reason="broken")
@pytest.mark.skipif(
new_scheduler_enabled(), reason="requires placement groups")
def test_placement_group_load_report(ray_start_cluster):
cluster = ray_start_cluster
# Add a head node that doesn't have gpu resource.
@@ -285,7 +287,6 @@ def test_placement_group_load_report(ray_start_cluster):
global_state_accessor.disconnect()
@pytest.mark.skipif(new_scheduler_enabled(), reason="broken")
def test_backlog_report(shutdown_only):
cluster = ray.init(
num_cpus=1, _system_config={