Update test case's error code of invalid shards_num (#21896)

Signed-off-by: nico <cheng.yuan@zilliz.com>
pull/21925/head
NicoYuan1986 2023-02-01 21:21:51 +08:00 committed by GitHub
parent bdcff5b921
commit 5d5a04d38e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -959,7 +959,7 @@ class TestCollectionParams(TestcaseBase):
self._connect()
c_name = cf.gen_unique_str(prefix)
error_type_shards_num = "2" # suppose to be int rather than str
error = {ct.err_code: -1, ct.err_msg: f"expected one of: int, long"}
error = {ct.err_code: 1, ct.err_msg: f"expected one of: int, long"}
self.collection_wrap.init_collection(c_name, schema=default_schema, shards_num=error_type_shards_num,
check_task=CheckTasks.err_res,
check_items=error)

View File

@ -335,7 +335,7 @@ class TestPartitionParams(TestcaseBase):
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