mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-31 07:55:38 +08:00
Merge branch 'branch-0.4.0' into 'branch-0.4.0'
fix unitest failure See merge request megasearch/milvus!530 Former-commit-id: 6cd07cdc7771f43ab969411672c195dc705d339d
This commit is contained in:
commit
b42dbcaa7d
@ -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