Skip to content

Commit

Permalink
test: modify test case about upsert partition (#33919)
Browse files Browse the repository at this point in the history
issue: #33902

Signed-off-by: nico <cheng.yuan@zilliz.com>
  • Loading branch information
NicoYuan1986 committed Jun 21, 2024
1 parent f3f390e commit c85644e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/python_client/testcases/test_partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,8 +1136,9 @@ def test_partition_upsert_with_auto_id(self):
error = {ct.err_code: 1, ct.err_msg: "Upsert don't support autoid == true"}
partition_w.upsert(upsert_data, check_task=CheckTasks.err_res, check_items=error)

@pytest.mark.tags(CaseLabel.L2)
def test_partition_upsert_same_pk_in_different_partitions(self):
@pytest.mark.tags(CaseLabel.L1)
@pytest.mark.parametrize("is_flush", [True, False])
def test_partition_upsert_same_pk_in_different_partitions(self, is_flush):
"""
target: test upsert same pk in different partitions
method: 1. create 2 partitions
Expand All @@ -1163,6 +1164,8 @@ def test_partition_upsert_same_pk_in_different_partitions(self):
partition_2.upsert(upsert_data)

# load
if is_flush:
collection_w.flush()
collection_w.create_index(ct.default_float_vec_field_name, ct.default_flat_index)
collection_w.load()

Expand Down

0 comments on commit c85644e

Please sign in to comment.