From ce7c1637cd5f55d9f12523bc8fb937d882728b06 Mon Sep 17 00:00:00 2001 From: zhuwenxing Date: Thu, 11 Nov 2021 18:45:02 +0800 Subject: [PATCH] Update query de-dup cases (#11637) Signed-off-by: zhuwenxing --- tests/python_client/testcases/test_query.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/python_client/testcases/test_query.py b/tests/python_client/testcases/test_query.py index c2ac60ee70..9bb2418609 100644 --- a/tests/python_client/testcases/test_query.py +++ b/tests/python_client/testcases/test_query.py @@ -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