diff --git a/src/graph/test/SchemaTest.cpp b/src/graph/test/SchemaTest.cpp index cbb5d828386..65cce1c0d39 100644 --- a/src/graph/test/SchemaTest.cpp +++ b/src/graph/test/SchemaTest.cpp @@ -42,9 +42,9 @@ TEST_F(SchemaTest, metaCommunication) { cpp2::ExecutionResponse resp; std::string query = "SHOW HOSTS"; client->execute(query, resp); - std::vector> expected{ - {"127.0.0.1", "1000"}, - {"127.0.0.1", "1100"}, + std::vector> expected{ + {"127.0.0.1", "1000", "online"}, + {"127.0.0.1", "1100", "online"}, }; ASSERT_TRUE(verifyResult(resp, expected)); } diff --git a/src/meta/processors/BaseProcessor.h b/src/meta/processors/BaseProcessor.h index 6fa7c2b7190..cbc02a7823e 100644 --- a/src/meta/processors/BaseProcessor.h +++ b/src/meta/processors/BaseProcessor.h @@ -171,7 +171,7 @@ class BaseProcessor { StatusOr> allHosts(); /** - * Get all hosts + * Get all hosts with online/offline status. * */ StatusOr> allHostsWithStatus(); diff --git a/src/meta/test/HBProcessorTest.cpp b/src/meta/test/HBProcessorTest.cpp index 732df4ad1f3..5ba0df7a900 100644 --- a/src/meta/test/HBProcessorTest.cpp +++ b/src/meta/test/HBProcessorTest.cpp @@ -25,6 +25,8 @@ using apache::thrift::FragileConstructor::FRAGILE; TEST(HBProcessorTest, HBTest) { fs::TempDir rootPath("/tmp/HBTest.XXXXXX"); std::unique_ptr kv(TestUtils::initKV(rootPath.path())); + FLAGS_expired_hosts_check_interval_sec = 1; + FLAGS_expired_threshold_sec = 1; { std::vector thriftHosts; for (auto i = 0; i < 10; i++) { @@ -51,8 +53,6 @@ TEST(HBProcessorTest, HBTest) { } } { - FLAGS_expired_hosts_check_interval_sec = 1; - FLAGS_expired_threshold_sec = 1; for (auto i = 0; i < 5; i++) { cpp2::HBReq req; nebula::cpp2::HostAddr thriftHost(FRAGILE, i, i);