提交 3321a82c 编写于 作者: G groot 提交者: Jin Hai

#670 Random failure of unittest db_test::SEARCH_TEST (#671)

上级 98e0aa51
......@@ -50,6 +50,7 @@ Please mark all change in change log and use the ticket from JIRA.
- \#649 - Typo "partiton" should be "partition"
- \#654 - Random crash when frequently insert vector one by one
- \#658 - Milvus error out when building SQ8H index without GPU resources
- \#670 - Random failure of unittest db_test::SEARCH_TEST
## Feature
- \#12 - Pure CPU version for Milvus
......
......@@ -338,7 +338,13 @@ TEST_F(DBTest, SEARCH_TEST) {
{ // search by specify index file
milvus::engine::meta::DatesT dates;
std::vector<std::string> file_ids = {"1", "2", "3", "4", "5", "6"};
std::vector<std::string> file_ids;
// sometimes this case run fast to merge file and build index, old file will be deleted immediately,
// so the QueryByFileID cannot get files to search
// input 100 files ids to avoid random failure of this case
for (int i = 0; i < 100; i++) {
file_ids.push_back(std::to_string(i));
}
milvus::engine::ResultIds result_ids;
milvus::engine::ResultDistances result_distances;
stat = db_->QueryByFileID(TABLE_NAME, file_ids, k, nq, 10, xq.data(), dates, result_ids, result_distances);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册