提交 4bc4c811 编写于 作者: Y Yu Kun

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


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