Modify error message and update pymilvus (#8071)

Signed-off-by: Binbin Lv <binbin.lv@zilliz.com>
pull/8084/head
binbin 2021-09-16 17:21:49 +08:00 committed by GitHub
parent 5792608e79
commit ddcb2b5349
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -31,4 +31,4 @@ class PartitionErrorMessage(ExceptionsMessage):
class IndexErrorMessage(ExceptionsMessage):
WrongFieldName = "%s has type %s, but expected one of: bytes, unicode"
WrongFieldName = "cannot create index on non-vector field: %s"

View File

@ -12,7 +12,7 @@ pytest-print==0.2.1
pytest-level==0.1.1
pytest-xdist==2.2.1
# pytest-parallel
pymilvus==2.0.0rc7.dev2
pymilvus==2.0.0rc7.dev4
pytest-rerunfailures==9.1.1
git+https://github.com/Projectplace/pytest-tags
ndg-httpsclient

View File

@ -53,12 +53,11 @@ class TestIndexParams(TestcaseBase):
collection_w = self.init_collection_wrap(name=collection_name)
log.error(iem.WrongFieldName % (str(field_name), type(field_name)))
log.error(iem.WrongFieldName % str(field_name))
self.index_wrap.init_index(collection_w.collection, field_name, default_index_params,
check_task=CheckTasks.err_res,
check_items={ct.err_code: 1,
ct.err_msg: iem.WrongFieldName % (str(field_name),
type(field_name).__name__)})
ct.err_msg: iem.WrongFieldName % str(field_name)})
@pytest.mark.tags(CaseLabel.L1)
def test_index_field_name_not_existed(self):
@ -71,7 +70,8 @@ class TestIndexParams(TestcaseBase):
f_name = cf.gen_unique_str(prefix)
collection_w = self.init_collection_wrap(name=c_name)
self.index_wrap.init_index(collection_w.collection, f_name, default_index_params, check_task=CheckTasks.err_res,
check_items={ct.err_code: 1, ct.err_msg: "CreateIndex failed"})
check_items={ct.err_code: 1,
ct.err_msg: f"cannot create index on non-existed field: {f_name}"})
@pytest.mark.tags(CaseLabel.L1)
# TODO (reason="pymilvus issue #677", raises=TypeError)