Skip to content

Commit 3516d53

Browse files
committed
Nit(CI): add some Nit tests to pass CI
Signed-off-by: zztaki <[email protected]>
1 parent bfd5acb commit 3516d53

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

test/client/client_common_unittest.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ TEST(ClientCommon, PeerAddrTest) {
6060
ASSERT_EQ(-1, caddr2.Parse(ipaddr4));
6161
std::string ipaddr5("127.0.0.1001:9000:0");
6262
ASSERT_EQ(-1, caddr2.Parse(ipaddr5));
63+
std::string ipaddr6;
64+
ASSERT_EQ(-1, caddr2.Parse(ipaddr6));
6365

6466
// 从字符串解析地址成功后,成员变量即为非空
6567
ASSERT_EQ(0, caddr2.Parse(ipaddr));

test/client/client_metric_test.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -383,5 +383,10 @@ TEST(MetricTest, MetricHelperTest) {
383383
ASSERT_NO_THROW(MetricHelper::IncremSlowRequestNum(nullptr));
384384
}
385385

386+
TEST(MetricTest, CollectMetricsTest) {
387+
InterfaceMetric interface("curve_client", "test");
388+
ASSERT_NO_THROW(CollectMetrics(&interface, 1, 1));
389+
}
390+
386391
} // namespace client
387392
} // namespace curve

0 commit comments

Comments
 (0)