Move global state API out of global_state object. (#4857)

This commit is contained in:
Robert Nishihara
2019-05-26 11:27:53 -07:00
committed by Philipp Moritz
parent ea8d7b4dc0
commit 6703519144
29 changed files with 387 additions and 403 deletions
+4 -4
View File
@@ -52,10 +52,10 @@ def test_internal_config(ray_start_cluster_head):
cluster.remove_node(worker)
time.sleep(1)
assert ray.global_state.cluster_resources()["CPU"] == 2
assert ray.cluster_resources()["CPU"] == 2
time.sleep(2)
assert ray.global_state.cluster_resources()["CPU"] == 1
assert ray.cluster_resources()["CPU"] == 1
def test_wait_for_nodes(ray_start_cluster_head):
@@ -70,12 +70,12 @@ def test_wait_for_nodes(ray_start_cluster_head):
[cluster.remove_node(w) for w in workers]
cluster.wait_for_nodes()
assert ray.global_state.cluster_resources()["CPU"] == 1
assert ray.cluster_resources()["CPU"] == 1
worker2 = cluster.add_node()
cluster.wait_for_nodes()
cluster.remove_node(worker2)
cluster.wait_for_nodes()
assert ray.global_state.cluster_resources()["CPU"] == 1
assert ray.cluster_resources()["CPU"] == 1
def test_worker_plasma_store_failure(ray_start_cluster_head):