mirror of https://github.com/milvus-io/milvus.git
Modify test case about replica number (#22251)
Signed-off-by: nico <cheng.yuan@zilliz.com>pull/22252/head
parent
8c6a2a35d7
commit
9ea4c509c7
|
@ -2228,11 +2228,11 @@ class TestLoadCollection(TestcaseBase):
|
|||
collection_w.create_index(ct.default_float_vec_field_name, index_params=ct.default_flat_index)
|
||||
|
||||
# load with non-number replicas
|
||||
error = {ct.err_code: 0, ct.err_msg: f"but expected one of: int, long"}
|
||||
error = {ct.err_code: 1, ct.err_msg: f"but expected one of: int, long"}
|
||||
collection_w.load(replica_number=get_non_number_replicas, check_task=CheckTasks.err_res, check_items=error)
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.parametrize("replicas", [-1, 0, None])
|
||||
@pytest.mark.parametrize("replicas", [-1, 0])
|
||||
def test_load_replica_invalid_number(self, replicas):
|
||||
"""
|
||||
target: test load partition with invalid replica number
|
||||
|
|
|
@ -329,17 +329,17 @@ class TestPartitionParams(TestcaseBase):
|
|||
partition_w.insert(cf.gen_default_list_data(nb=100))
|
||||
|
||||
# load with non-number replicas
|
||||
error = {ct.err_code: 0, ct.err_msg: f"but expected one of: int, long"}
|
||||
error = {ct.err_code: 1, ct.err_msg: f"but expected one of: int, long"}
|
||||
collection_w.create_index(ct.default_float_vec_field_name, index_params=ct.default_flat_index)
|
||||
partition_w.load(replica_number=get_non_number_replicas, check_task=CheckTasks.err_res, check_items=error)
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.parametrize("replicas", [0, -1, None])
|
||||
@pytest.mark.parametrize("replicas", [0, -1])
|
||||
def test_load_replica_invalid_number(self, replicas):
|
||||
"""
|
||||
target: test load partition with invalid replica number
|
||||
method: load with invalid replica number
|
||||
expected: raise exception
|
||||
expected: load successfully as replica = 1
|
||||
"""
|
||||
# create, insert
|
||||
self._connect()
|
||||
|
|
Loading…
Reference in New Issue