From f4d7dd6c9399e285b16228a1c8c4b90bd52a9732 Mon Sep 17 00:00:00 2001 From: Jin Hai Date: Tue, 24 Mar 2020 10:11:10 +0800 Subject: [PATCH] #1724 Remove unused unittests (#1725) * #1724 Remove unused unittests Signed-off-by: JinHai-CN * #1724 Remove unused unittests - part2 Signed-off-by: JinHai-CN * #1724 Remove unused unittests - part3 Signed-off-by: JinHai-CN * #1724 Remove unused unittests - part4 Signed-off-by: JinHai-CN * #1724 Remove unused unittests - part5 Signed-off-by: JinHai-CN --- CHANGELOG.md | 3 ++- core/src/index/archive/VecIndex.cpp | 2 ++ core/unittest/db/test_engine.cpp | 12 ++++-------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91307eece5..983aa14277 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Please mark all change in change log and use the issue from GitHub - \#1663 PQ index parameter 'm' validation - \#1686 API search_in_files cannot work correctly when vectors is stored in certain non-default partition - \#1689 Fix SQ8H search fail on SIFT-1B dataset +- \#1724 Remove unused unittests ## Feature - \#1603 BinaryFlat add 2 Metric: Substructure and Superstructure @@ -26,7 +27,7 @@ Please mark all change in change log and use the issue from GitHub - \#1546 Move Config.cpp to config directory - \#1547 Rename storage/file to storage/disk and rename classes - \#1548 Move store/Directory to storage/Operation and add FSHandler -- \#1572 optimize config cpu/gpu cache_capacity setter +- \#1572 Optimize config cpu/gpu cache_capacity setter - \#1619 Improve compact performance - \#1649 Fix Milvus crash on old CPU - \#1653 IndexFlat (SSE) and IndexBinaryFlat performance improvement for small NQ diff --git a/core/src/index/archive/VecIndex.cpp b/core/src/index/archive/VecIndex.cpp index 8225452c08..875c8f56fc 100644 --- a/core/src/index/archive/VecIndex.cpp +++ b/core/src/index/archive/VecIndex.cpp @@ -66,6 +66,7 @@ read_index(const std::string& location) { size_t length = reader_ptr->length(); if (length <= 0) { + STORAGE_LOG_DEBUG << "read_index(" << location << ") failed!"; return nullptr; } @@ -77,6 +78,7 @@ read_index(const std::string& location) { rp += sizeof(current_type); reader_ptr->seekg(rp); + STORAGE_LOG_DEBUG << "Start to read_index(" << location << ") length: " << length << " bytes"; while (rp < length) { size_t meta_length; reader_ptr->read(&meta_length, sizeof(meta_length)); diff --git a/core/unittest/db/test_engine.cpp b/core/unittest/db/test_engine.cpp index 3ff8b476bb..ac05c4d1e1 100644 --- a/core/unittest/db/test_engine.cpp +++ b/core/unittest/db/test_engine.cpp @@ -266,12 +266,8 @@ TEST_F(EngineTest, ENGINE_IMPL_THROW_EXCEPTION_TEST) { fiu_disable("ValidateStringNotBool"); - fiu_init(0); // init - fiu_enable("vecIndex.throw_read_exception", 1, NULL, 0); - - engine_ptr->Load(true); - engine_ptr->CopyToGpu(0, true); - engine_ptr->CopyToCpu(); - - fiu_disable("vecIndex.throw_read_exception"); + // Temporary removed for UT. + // engine_ptr->Load(true); + // engine_ptr->CopyToGpu(0, true); + // engine_ptr->CopyToCpu(); }