MCPcopy Index your code
hub / github.com/ray-project/ray / test_cluster

Function test_cluster

python/ray/tests/test_multi_node_2.py:20–30  ·  view source on GitHub ↗

Basic test for adding and removing nodes in cluster.

()

Source from the content-addressed store, hash-verified

18
19
20def test_cluster():
21 """Basic test for adding and removing nodes in cluster."""
22 g = Cluster(initialize_head=False)
23 node = g.add_node()
24 node2 = g.add_node()
25 assert node.remaining_processes_alive()
26 assert node2.remaining_processes_alive()
27 g.remove_node(node2)
28 g.remove_node(node)
29 assert not any(n.any_processes_alive() for n in [node, node2])
30 g.shutdown()
31
32
33def test_shutdown():

Callers

nothing calls this directly

Calls 6

add_nodeMethod · 0.95
remove_nodeMethod · 0.95
shutdownMethod · 0.95
ClusterClass · 0.90
any_processes_aliveMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…