提交 6ed3fb59 编写于 作者: Y Yu Kun

Merge remote-tracking branch 'upstream/branch-0.5.0' into branch-0.5.0-yk


Former-commit-id: 61c6d4eac8f2190b2d43de8cdf1a8e38f08c8fe6
......@@ -18,11 +18,13 @@
#include <gtest/gtest.h>
#include <gtest/gtest-death-test.h>
#include "config/ConfigMgr.h"
#include "config/YamlConfigMgr.h"
#include "utils/CommonUtil.h"
#include "utils/ValidationUtil.h"
#include "server/Config.h"
using namespace milvus;
namespace {
static const char *CONFIG_FILE_PATH = "./milvus/conf/server_config.yaml";
......@@ -35,16 +37,16 @@ static constexpr uint64_t GB = MB * 1024;
} // namespace
TEST(ConfigTest, CONFIG_TEST) {
milvus::server::ConfigMgr *config_mgr = milvus::server::ConfigMgr::GetInstance();
server::ConfigMgr *config_mgr = server::YamlConfigMgr::GetInstance();
milvus::ErrorCode err = config_mgr->LoadConfigFile("");
ASSERT_EQ(err, milvus::SERVER_UNEXPECTED_ERROR);
milvus::Status s = config_mgr->LoadConfigFile("");
ASSERT_FALSE(s.ok());
err = config_mgr->LoadConfigFile(LOG_FILE_PATH);
ASSERT_EQ(err, milvus::SERVER_UNEXPECTED_ERROR);
s = config_mgr->LoadConfigFile(LOG_FILE_PATH);
ASSERT_FALSE(s.ok());
err = config_mgr->LoadConfigFile(CONFIG_FILE_PATH);
ASSERT_EQ(err, milvus::SERVER_SUCCESS);
s = config_mgr->LoadConfigFile(CONFIG_FILE_PATH);
ASSERT_TRUE(s.ok());
config_mgr->Print();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册