@@ -1663,15 +1663,16 @@ TEST(MetaServiceHttpTest, UpdateConfig) {
1663
1663
ASSERT_EQ (config::recycle_interval_seconds, 3601 );
1664
1664
}
1665
1665
{
1666
- config::g_conf_path = " ./doris_cloud.conf" ;
1666
+ auto original_conf_path = config::custom_conf_path;
1667
+ config::custom_conf_path = " ./doris_cloud.conf" ;
1667
1668
auto [status_code, content] = ctx.query <std::string>(
1668
1669
" update_config" ,
1669
1670
" configs=recycle_interval_seconds=3659,retention_seconds=259219&persist=true" );
1670
1671
ASSERT_EQ (status_code, 200 );
1671
1672
ASSERT_EQ (config::recycle_interval_seconds, 3659 );
1672
1673
ASSERT_EQ (config::retention_seconds, 259219 );
1673
1674
config::Properties props;
1674
- ASSERT_TRUE (props.load (config::g_conf_path. data (), true ));
1675
+ ASSERT_TRUE (props.load (config::custom_conf_path. c_str (), true ));
1675
1676
{
1676
1677
bool new_val_set = false ;
1677
1678
int64_t recycle_interval_s = 0 ;
@@ -1688,7 +1689,8 @@ TEST(MetaServiceHttpTest, UpdateConfig) {
1688
1689
ASSERT_TRUE (new_val_set);
1689
1690
ASSERT_EQ (retention_s, 259219 );
1690
1691
}
1691
- std::filesystem::remove (config::g_conf_path);
1692
+ std::filesystem::remove (config::custom_conf_path);
1693
+ config::custom_conf_path = original_conf_path;
1692
1694
}
1693
1695
}
1694
1696
0 commit comments