mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 16:32:21 +08:00
Move global state API out of global_state object. (#4857)
This commit is contained in:
committed by
Philipp Moritz
parent
ea8d7b4dc0
commit
6703519144
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user