Update query de-dup cases (#11637)

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
zhuwenxing 2021-11-11 18:45:02 +08:00 committed by GitHub
parent 77b6439c65
commit ce7c1637cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,8 +90,9 @@ class TestQueryParams(TestcaseBase):
check_items={exp_res: res[:1]})
@pytest.mark.tags(CaseLabel.L1)
@pytest.mark.parametrize("dup_times",[1,2,3])
@pytest.mark.parametrize("dim", [8, 128])
def test_query_with_dup_primary_key(self, dim):
def test_query_with_dup_primary_key(self, dim, dup_times):
"""
target: test query with duplicate primary key
method: 1.insert same data twice
@ -100,8 +101,9 @@ class TestQueryParams(TestcaseBase):
"""
nb = ct.default_nb
collection_w, insert_data, _, _ = self.init_collection_general(prefix, True, nb, dim=dim)[0:4]
# insert data again
collection_w.insert(insert_data[0])
# insert dup data multi times
for i in range(dup_times):
collection_w.insert(insert_data[0])
# query
res, _ = collection_w.query(default_term_expr)
# assert that query results are de-duplicated