mirror of
https://github.com/wassname/ray.git
synced 2026-07-21 12:50:45 +08:00
[Core] Add name of actor in the result of ray.actors() (#11828)
Added name field to `actor_info` Fixes #11112
This commit is contained in:
@@ -154,7 +154,7 @@ def test_global_state_api(shutdown_only):
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
_ = Actor.remote() # noqa: F841
|
||||
_ = Actor.options(name="test_actor").remote() # noqa: F841
|
||||
# Wait for actor to be created
|
||||
wait_for_num_actors(1)
|
||||
|
||||
@@ -163,6 +163,7 @@ def test_global_state_api(shutdown_only):
|
||||
|
||||
actor_info, = actor_table.values()
|
||||
assert actor_info["JobID"] == job_id.hex()
|
||||
assert actor_info["Name"] == "test_actor"
|
||||
assert "IPAddress" in actor_info["Address"]
|
||||
assert "IPAddress" in actor_info["OwnerAddress"]
|
||||
assert actor_info["Address"]["Port"] != actor_info["OwnerAddress"]["Port"]
|
||||
|
||||
Reference in New Issue
Block a user