未验证 提交 be1618c8 编写于 作者: Y yanliang567 提交者: GitHub

Add a test to verify load works for data inserted after the load operation (#9865)

Signed-off-by: Nyanliang567 <yanliang.qiao@zilliz.com>
上级 10a436d0
import pytest import pytest
from time import sleep
from base.client_base import TestcaseBase from base.client_base import TestcaseBase
from utils.util_log import test_log as log from utils.util_log import test_log as log
...@@ -495,8 +496,18 @@ class TestCollectionSearchInvalid(TestcaseBase): ...@@ -495,8 +496,18 @@ class TestCollectionSearchInvalid(TestcaseBase):
check_items={"nq": default_nq, check_items={"nq": default_nq,
"ids": [], "ids": [],
"limit": 0}) "limit": 0})
# 4. TODO: search collection with data inserted and not load again # 4. search with data inserted but not load again
data = cf.gen_default_dataframe_data(nb=2000)
insert_res, _ = collection_w.insert(data)
sleep(0.2)
# insert_ids = []
# insert_ids.extend(insert_res.primary_keys)
collection_w.search(vectors[:default_nq], default_search_field, default_search_params,
default_limit, default_search_exp,
check_task=CheckTasks.check_search_results,
check_items={"nq": default_nq,
"ids": insert_res.primary_keys,
"limit": default_limit})
@pytest.mark.tags(CaseLabel.L1) @pytest.mark.tags(CaseLabel.L1)
def test_search_partition_deleted(self): def test_search_partition_deleted(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册