mirror of https://github.com/milvus-io/milvus.git
Modify test cases of connection error (#19977)
Signed-off-by: nico <cheng.yuan@zilliz.com> Signed-off-by: nico <cheng.yuan@zilliz.com>pull/19969/head
parent
97f674cff0
commit
fb02930be5
|
@ -197,6 +197,7 @@ class CheckTasks:
|
|||
check_merge_compact = "check_merge_compact"
|
||||
check_role_property = "check_role_property"
|
||||
check_permission_deny = "check_permission_deny"
|
||||
check_value_equal = "check_value_equal"
|
||||
|
||||
|
||||
class BulkLoadStates:
|
||||
|
|
|
@ -871,9 +871,10 @@ class TestConnectIPInvalid(TestcaseBase):
|
|||
method: set host in get_not_string
|
||||
expected: connected is False
|
||||
"""
|
||||
err_msg = cem.FailConnect % (host, port)
|
||||
self.connection_wrap.connect(alias=DefaultConfig.DEFAULT_USING, host=host, port=port, check_task=ct.CheckTasks.ccr,
|
||||
check_items={ct.err_code: -1, ct.err_msg: err_msg})
|
||||
err_msg = "Type of 'host' must be str."
|
||||
self.connection_wrap.connect(alias=DefaultConfig.DEFAULT_USING, host=host, port=port,
|
||||
check_task=ct.CheckTasks.check_value_equal,
|
||||
check_items={ct.err_code: 1, ct.err_msg: err_msg})
|
||||
|
||||
|
||||
class TestConnectPortInvalid(TestcaseBase):
|
||||
|
@ -889,9 +890,10 @@ class TestConnectPortInvalid(TestcaseBase):
|
|||
method: set port in get_not_string
|
||||
expected: connected is False
|
||||
"""
|
||||
err_msg = cem.FailConnect % (host, str(port))
|
||||
self.connection_wrap.connect(alias=DefaultConfig.DEFAULT_USING, host=host, port=port, check_task=ct.CheckTasks.ccr,
|
||||
check_items={ct.err_code: -1, ct.err_msg: err_msg})
|
||||
err_msg = "Type of 'host' must be str."
|
||||
self.connection_wrap.connect(alias=DefaultConfig.DEFAULT_USING, host=host, port=port,
|
||||
check_task=ct.CheckTasks.check_value_equal,
|
||||
check_items={ct.err_code: 1, ct.err_msg: err_msg})
|
||||
|
||||
|
||||
class TestConnectUriInvalid(TestcaseBase):
|
||||
|
|
Loading…
Reference in New Issue