Fix TestObjectTableResubscribe testcase bug (#9650)

This commit is contained in:
fangfengbin
2020-07-23 20:28:31 +08:00
committed by GitHub
parent 64b0f173c8
commit 5ab17e0dd8
@@ -981,12 +981,16 @@ TEST_F(ServiceBasedGcsClientTest, TestObjectTableResubscribe) {
// Restart GCS.
RestartGcsServer();
// When GCS client detects that GCS server has restarted, but the pub-sub server
// didn't restart, it will fetch the subscription data again from the GCS server, so
// `object2_change_count` plus 1.
WaitPendingDone(object2_change_count, 2);
// Add location of object to GCS again and check if resubscribe works.
ASSERT_TRUE(AddLocation(object1_id, node_id));
WaitPendingDone(object1_change_count, 1);
ASSERT_TRUE(AddLocation(object2_id, node_id));
WaitPendingDone(object2_change_count, 2);
WaitPendingDone(object2_change_count, 3);
}
TEST_F(ServiceBasedGcsClientTest, TestNodeTableResubscribe) {