提交 f773ac9a 编写于 作者: G groot

refine test code


Former-commit-id: d137fe1c53e2e05950361f2f376aea1f33a0a228
上级 149c2459
......@@ -12,8 +12,9 @@
#include <gmock/gmock.h>
#include <easylogging++.h>
#include "src/ClientApp.h"
#include "src/FaissTest.h"
#include "src/Log.h"
#include "server/ServerConfig.h"
INITIALIZE_EASYLOGGINGPP
......@@ -57,8 +58,10 @@ main(int argc, char *argv[]) {
}
}
zilliz::vecwise::client::ClientApp app;
app.Run(config_filename);
zilliz::vecwise::server::ServerConfig& config = zilliz::vecwise::server::ServerConfig::GetInstance();
config.LoadConfigFile(config_filename);
CLIENT_LOG_INFO << "Load config file:" << config_filename;
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
......
/*******************************************************************************
* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited.
* Proprietary and confidential.
******************************************************************************/
#include "ClientApp.h"
#include "server/ServerConfig.h"
#include "Log.h"
namespace zilliz {
namespace vecwise {
namespace client {
void ClientApp::Run(const std::string &config_file) {
server::ServerConfig& config = server::ServerConfig::GetInstance();
config.LoadConfigFile(config_file);
CLIENT_LOG_INFO << "Load config file:" << config_file;
}
}
}
}
/*******************************************************************************
* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited.
* Proprietary and confidential.
******************************************************************************/
#pragma once
#include <string>
namespace zilliz {
namespace vecwise {
namespace client {
class ClientApp {
public:
void Run(const std::string& config_file);
};
}
}
}
......@@ -5,7 +5,6 @@
////////////////////////////////////////////////////////////////////////////////
#include <gtest/gtest.h>
#include <utils/TimeRecorder.h>
#include "ClientApp.h"
#include "ClientSession.h"
#include "server/ServerConfig.h"
#include "Log.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册