mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
[TEST]Fix TestActorSubscribeAll bug (#11297)
Co-authored-by: 灵洵 <fengbin.ffb@antfin.com>
This commit is contained in:
parent
40071739dc
commit
ca36105d77
2 changed files with 11 additions and 3 deletions
|
@ -171,6 +171,14 @@ class ServiceBasedGcsClientTest : public ::testing::Test {
|
|||
message.set_parent_task_id(TaskID::ForActorCreationTask(actor_id).Binary());
|
||||
message.mutable_actor_creation_task_spec()->set_actor_id(actor_id.Binary());
|
||||
message.mutable_actor_creation_task_spec()->set_is_detached(is_detached);
|
||||
// If the actor is non-detached, the `WaitForActorOutOfScope` function of the core
|
||||
// worker client is called during the actor registration process. In order to simulate
|
||||
// the scenario of registration failure, we set the address to an illegal value.
|
||||
if (!is_detached) {
|
||||
rpc::Address address;
|
||||
address.set_ip_address("");
|
||||
message.mutable_caller_address()->CopyFrom(address);
|
||||
}
|
||||
TaskSpecification task_spec(message);
|
||||
|
||||
if (skip_wait) {
|
||||
|
@ -657,8 +665,8 @@ TEST_F(ServiceBasedGcsClientTest, TestActorSubscribeAll) {
|
|||
ASSERT_TRUE(SubscribeAllActors(on_subscribe));
|
||||
|
||||
// Register an actor to GCS.
|
||||
ASSERT_FALSE(RegisterActor(actor_table_data1, false));
|
||||
ASSERT_FALSE(RegisterActor(actor_table_data2, false));
|
||||
RegisterActor(actor_table_data1, false);
|
||||
RegisterActor(actor_table_data2, false);
|
||||
WaitForExpectedCount(actor_update_count, 2);
|
||||
}
|
||||
|
||||
|
|
|
@ -542,7 +542,7 @@ void GcsActorManager::PollOwnerForActorOutOfScope(
|
|||
RAY_LOG(INFO) << "Worker " << owner_id << " failed, destroying actor child.";
|
||||
} else {
|
||||
RAY_LOG(INFO) << "Actor " << actor_id
|
||||
<< " is out of scope,, destroying actor child.";
|
||||
<< " is out of scope, destroying actor child.";
|
||||
}
|
||||
|
||||
auto node_it = owners_.find(owner_node_id);
|
||||
|
|
Loading…
Add table
Reference in a new issue