diff --git a/cpp/test_client/main.cpp b/cpp/test_client/main.cpp index 0bed6bd097..0c2039f25c 100644 --- a/cpp/test_client/main.cpp +++ b/cpp/test_client/main.cpp @@ -12,8 +12,9 @@ #include #include -#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(); diff --git a/cpp/test_client/src/ClientApp.cpp b/cpp/test_client/src/ClientApp.cpp deleted file mode 100644 index fc88baaf2f..0000000000 --- a/cpp/test_client/src/ClientApp.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * 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; -} - -} -} -} - diff --git a/cpp/test_client/src/ClientApp.h b/cpp/test_client/src/ClientApp.h deleted file mode 100644 index 1518730d35..0000000000 --- a/cpp/test_client/src/ClientApp.h +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved - * Unauthorized copying of this file, via any medium is strictly prohibited. - * Proprietary and confidential. - ******************************************************************************/ -#pragma once - -#include - -namespace zilliz { -namespace vecwise { -namespace client { - -class ClientApp { -public: - void Run(const std::string& config_file); -}; - -} -} -} diff --git a/cpp/test_client/src/ClientTest.cpp b/cpp/test_client/src/ClientTest.cpp index 59d717aadd..762cc95bd4 100644 --- a/cpp/test_client/src/ClientTest.cpp +++ b/cpp/test_client/src/ClientTest.cpp @@ -5,7 +5,6 @@ //////////////////////////////////////////////////////////////////////////////// #include #include -#include "ClientApp.h" #include "ClientSession.h" #include "server/ServerConfig.h" #include "Log.h"