Fix max collection name case (#22600)

Signed-off-by: ThreadDao <yufen.zong@zilliz.com>
This commit is contained in:
ThreadDao 2023-03-09 19:11:57 +08:00 committed by GitHub
parent e0352db982
commit 9ef96db123
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -124,7 +124,7 @@ class ApiCollectionWrapper:
func_name = sys._getframe().f_code.co_name
res, check = api_request([self.collection.insert, data, partition_name], **kwargs)
check_result = ResponseChecker(res, func_name, check_task, check_items, check,
dat=data, partition_name=partition_name,
data=data, partition_name=partition_name,
**kwargs).run()
return res, check_result

View File

@ -60,6 +60,7 @@ compact_delta_ratio_reciprocal = 5 # compact_delta_binlog_ratio is 0.2
compact_retention_duration = 40 # compaction travel time retention range 20s
max_compaction_interval = 60 # the max time interval (s) from the last compaction
max_field_num = 64 # Maximum number of fields in a collection
max_name_length = 255 # Maximum length of name for a collection or alias
default_replica_num = 1
IMAGE_REPOSITORY_MILVUS = "harbor.milvus.io/dockerhub/milvusdb/milvus"
NAMESPACE_CHAOS_TESTING = "chaos-testing"
@ -92,7 +93,7 @@ get_invalid_strs = [
"(mn)",
"中文",
"%$#",
"a".join("a" for i in range(256))]
"".join("a" for i in range(max_name_length + 1))]
get_not_string = [
[],

View File

@ -131,7 +131,7 @@ class TestCollectionParams(TestcaseBase):
check_items={exp_name: name, exp_schema: schema})
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.parametrize("name", ["12-s", "12 s", "(mn)", "中文", "%$#", "a".join("a" for i in range(256))])
@pytest.mark.parametrize("name", ["12-s", "12 s", "(mn)", "中文", "%$#", "".join("a" for i in range(ct.max_name_length + 1))])
def test_collection_invalid_name(self, name):
"""
target: test collection with invalid name