提交 08ed782a 编写于 作者: S starlord

fix unitest failure


Former-commit-id: 21ed773255ced64c264ab998058a27dd6f0d36bb
上级 b47abd51
...@@ -378,11 +378,11 @@ TEST_F(DBTest, INDEX_TEST) { ...@@ -378,11 +378,11 @@ TEST_F(DBTest, INDEX_TEST) {
ASSERT_TRUE(stat.ok()); ASSERT_TRUE(stat.ok());
engine::TableIndex index_out; engine::TableIndex index_out;
stat = db_->DescribeIndex(table_info.table_id_, index); stat = db_->DescribeIndex(table_info.table_id_, index_out);
ASSERT_TRUE(stat.ok()); ASSERT_TRUE(stat.ok());
ASSERT_EQ(index.engine_type_, index_out.engine_type_); ASSERT_EQ(index.engine_type_, index_out.engine_type_);
ASSERT_EQ(index.nlist_, index_out.nlist_); ASSERT_EQ(index.nlist_, index_out.nlist_);
ASSERT_EQ(index.metric_type_, index_out.metric_type_); ASSERT_EQ(table_info.metric_type_, index_out.metric_type_);
stat = db_->DropIndex(table_info.table_id_); stat = db_->DropIndex(table_info.table_id_);
ASSERT_TRUE(stat.ok()); ASSERT_TRUE(stat.ok());
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "db/Factories.h" #include "db/Factories.h"
#include "db/Options.h" #include "db/Options.h"
#include "server/ServerConfig.h" #include "server/ServerConfig.h"
#include "knowhere/index/vector_index/gpu_ivf.h"
INITIALIZE_EASYLOGGINGPP INITIALIZE_EASYLOGGINGPP
...@@ -59,6 +60,8 @@ engine::Options BaseTest::GetOptions() { ...@@ -59,6 +60,8 @@ engine::Options BaseTest::GetOptions() {
void DBTest::SetUp() { void DBTest::SetUp() {
BaseTest::SetUp(); BaseTest::SetUp();
zilliz::knowhere::FaissGpuResourceMgr::GetInstance().InitDevice(0, 1024*1024*200, 1024*1024*300, 2);
server::ConfigNode& config = server::ServerConfig::GetInstance().GetConfig(server::CONFIG_CACHE); server::ConfigNode& config = server::ServerConfig::GetInstance().GetConfig(server::CONFIG_CACHE);
config.AddSequenceItem(server::CONFIG_GPU_IDS, "0"); config.AddSequenceItem(server::CONFIG_GPU_IDS, "0");
...@@ -84,6 +87,8 @@ void DBTest::TearDown() { ...@@ -84,6 +87,8 @@ void DBTest::TearDown() {
db_->DropAll(); db_->DropAll();
delete db_; delete db_;
zilliz::knowhere::FaissGpuResourceMgr::GetInstance().Free();
engine::ResMgrInst::GetInstance()->Stop(); engine::ResMgrInst::GetInstance()->Stop();
engine::SchedInst::GetInstance()->Stop(); engine::SchedInst::GetInstance()->Stop();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册