Skip to content

Commit

Permalink
Nit(CI): add some Nit tests to pass CI
Browse files Browse the repository at this point in the history
Signed-off-by: zztaki <[email protected]>
  • Loading branch information
zztaki committed Dec 27, 2023
1 parent bfd5acb commit 3516d53
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/client/client_common_unittest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ TEST(ClientCommon, PeerAddrTest) {
ASSERT_EQ(-1, caddr2.Parse(ipaddr4));
std::string ipaddr5("127.0.0.1001:9000:0");
ASSERT_EQ(-1, caddr2.Parse(ipaddr5));
std::string ipaddr6;
ASSERT_EQ(-1, caddr2.Parse(ipaddr6));

// 从字符串解析地址成功后,成员变量即为非空
ASSERT_EQ(0, caddr2.Parse(ipaddr));
Expand Down
5 changes: 5 additions & 0 deletions test/client/client_metric_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,5 +383,10 @@ TEST(MetricTest, MetricHelperTest) {
ASSERT_NO_THROW(MetricHelper::IncremSlowRequestNum(nullptr));
}

TEST(MetricTest, CollectMetricsTest) {
InterfaceMetric interface("curve_client", "test");
ASSERT_NO_THROW(CollectMetrics(&interface, 1, 1));
}

} // namespace client
} // namespace curve

0 comments on commit 3516d53

Please sign in to comment.