From a075e3769513c10b2dcb43c72cf5d773f368726c Mon Sep 17 00:00:00 2001 From: fangfengbin <869218239a@zju.edu.cn> Date: Wed, 21 Oct 2020 13:32:41 +0800 Subject: [PATCH] [GCS]Fix TestActorTableResubscribe bug (#11463) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 灵洵 --- .../gcs_client/test/service_based_gcs_client_test.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ray/gcs/gcs_client/test/service_based_gcs_client_test.cc b/src/ray/gcs/gcs_client/test/service_based_gcs_client_test.cc index c1912fe5f..2ab288355 100644 --- a/src/ray/gcs/gcs_client/test/service_based_gcs_client_test.cc +++ b/src/ray/gcs/gcs_client/test/service_based_gcs_client_test.cc @@ -1043,10 +1043,13 @@ TEST_F(ServiceBasedGcsClientTest, TestActorTableResubscribe) { // notification of DEAD state. WaitForExpectedCount(num_subscribe_all_notifications, 3); WaitForExpectedCount(num_subscribe_one_notifications, 3); - CheckActorData(subscribe_all_notifications[1], rpc::ActorTableData::DEAD); - CheckActorData(subscribe_one_notifications[1], rpc::ActorTableData::DEAD); - CheckActorData(subscribe_all_notifications[2], rpc::ActorTableData::DEAD); - CheckActorData(subscribe_one_notifications[2], rpc::ActorTableData::DEAD); + /// NOTE: GCS will not reply when actor registration fails, so when GCS restarts, gcs + /// client will register the actor again. When an actor is registered, the status in GCS + /// is `DEPENDENCIES_UNREADY`. When GCS finds that the owner of an actor is nil, it will + /// destroy the actor and the status of the actor will change to `DEAD`. The GCS client + /// fetch actor info from the GCS server, and the status of the actor may be + /// `DEPENDENCIES_UNREADY` or `DEAD`, so we do not assert the actor status here any + /// more. } TEST_F(ServiceBasedGcsClientTest, TestObjectTableResubscribe) {