mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
fix unitest failure
Former-commit-id: 21ed773255ced64c264ab998058a27dd6f0d36bb
This commit is contained in:
parent
b47abd51ba
commit
08ed782a6e
@ -378,11 +378,11 @@ TEST_F(DBTest, INDEX_TEST) {
|
||||
ASSERT_TRUE(stat.ok());
|
||||
|
||||
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_EQ(index.engine_type_, index_out.engine_type_);
|
||||
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_);
|
||||
ASSERT_TRUE(stat.ok());
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
#include "db/Factories.h"
|
||||
#include "db/Options.h"
|
||||
#include "server/ServerConfig.h"
|
||||
#include "knowhere/index/vector_index/gpu_ivf.h"
|
||||
|
||||
INITIALIZE_EASYLOGGINGPP
|
||||
|
||||
@ -59,6 +60,8 @@ engine::Options BaseTest::GetOptions() {
|
||||
void DBTest::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);
|
||||
config.AddSequenceItem(server::CONFIG_GPU_IDS, "0");
|
||||
|
||||
@ -84,6 +87,8 @@ void DBTest::TearDown() {
|
||||
db_->DropAll();
|
||||
delete db_;
|
||||
|
||||
zilliz::knowhere::FaissGpuResourceMgr::GetInstance().Free();
|
||||
|
||||
engine::ResMgrInst::GetInstance()->Stop();
|
||||
engine::SchedInst::GetInstance()->Stop();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user