mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 01:58:34 +08:00
Change the error_code to make the test case pass (#18129)
Signed-off-by: elstic <hao.wang@zilliz.com>
This commit is contained in:
parent
6df47c7faf
commit
dd310bbce9
@ -897,8 +897,7 @@ class TestConnectUriInvalid(TestcaseBase):
|
|||||||
|
|
||||||
uri = "{}://{}:{}".format(protocol, host, port)
|
uri = "{}://{}:{}".format(protocol, host, port)
|
||||||
self.connection_wrap.connect(alias=connect_name, uri=uri, check_task=ct.CheckTasks.err_res,
|
self.connection_wrap.connect(alias=connect_name, uri=uri, check_task=ct.CheckTasks.err_res,
|
||||||
# return code -1
|
check_items={ct.err_code: -1})
|
||||||
check_items={ct.err_code: 0})
|
|
||||||
|
|
||||||
@pytest.mark.tags(ct.CaseLabel.L2)
|
@pytest.mark.tags(ct.CaseLabel.L2)
|
||||||
@pytest.mark.parametrize("host", ["256.256.256.256", "10.1.0"])
|
@pytest.mark.parametrize("host", ["256.256.256.256", "10.1.0"])
|
||||||
@ -913,8 +912,7 @@ class TestConnectUriInvalid(TestcaseBase):
|
|||||||
|
|
||||||
uri = "{}://{}:{}".format(protocol, host, port)
|
uri = "{}://{}:{}".format(protocol, host, port)
|
||||||
self.connection_wrap.connect(alias=connect_name, uri=uri, check_task=ct.CheckTasks.err_res,
|
self.connection_wrap.connect(alias=connect_name, uri=uri, check_task=ct.CheckTasks.err_res,
|
||||||
# return code 2
|
check_items={ct.err_code: 2})
|
||||||
check_items={ct.err_code: 0})
|
|
||||||
|
|
||||||
@pytest.mark.tags(ct.CaseLabel.L2)
|
@pytest.mark.tags(ct.CaseLabel.L2)
|
||||||
@pytest.mark.parametrize("port", ["8080", "443", "0", "65536"])
|
@pytest.mark.parametrize("port", ["8080", "443", "0", "65536"])
|
||||||
@ -929,8 +927,7 @@ class TestConnectUriInvalid(TestcaseBase):
|
|||||||
|
|
||||||
uri = "{}://{}:{}".format(protocol, host, port)
|
uri = "{}://{}:{}".format(protocol, host, port)
|
||||||
self.connection_wrap.connect(alias=connect_name, uri=uri, check_task=ct.CheckTasks.err_res,
|
self.connection_wrap.connect(alias=connect_name, uri=uri, check_task=ct.CheckTasks.err_res,
|
||||||
# return code 2
|
check_items={ct.err_code: 2})
|
||||||
check_items={ct.err_code: 0})
|
|
||||||
|
|
||||||
@pytest.mark.tags(ct.CaseLabel.L2)
|
@pytest.mark.tags(ct.CaseLabel.L2)
|
||||||
@pytest.mark.parametrize("host", ["www.google.com"])
|
@pytest.mark.parametrize("host", ["www.google.com"])
|
||||||
@ -946,8 +943,7 @@ class TestConnectUriInvalid(TestcaseBase):
|
|||||||
|
|
||||||
uri = "{}://{}:{}".format(protocol, host, port)
|
uri = "{}://{}:{}".format(protocol, host, port)
|
||||||
self.connection_wrap.connect(alias=connect_name, uri=uri, check_task=ct.CheckTasks.err_res,
|
self.connection_wrap.connect(alias=connect_name, uri=uri, check_task=ct.CheckTasks.err_res,
|
||||||
# return code 2
|
check_items={ct.err_code: 2})
|
||||||
check_items={ct.err_code: 0})
|
|
||||||
|
|
||||||
|
|
||||||
class TestConnectAddressInvalid(TestcaseBase):
|
class TestConnectAddressInvalid(TestcaseBase):
|
||||||
@ -965,8 +961,7 @@ class TestConnectAddressInvalid(TestcaseBase):
|
|||||||
"""
|
"""
|
||||||
address = "{}:{}".format(host, port)
|
address = "{}:{}".format(host, port)
|
||||||
self.connection_wrap.connect(alias=connect_name, address=address, check_task=ct.CheckTasks.err_res,
|
self.connection_wrap.connect(alias=connect_name, address=address, check_task=ct.CheckTasks.err_res,
|
||||||
# return code 2
|
check_items={ct.err_code: 2})
|
||||||
check_items={ct.err_code: 0})
|
|
||||||
|
|
||||||
@pytest.mark.tags(ct.CaseLabel.L2)
|
@pytest.mark.tags(ct.CaseLabel.L2)
|
||||||
@pytest.mark.parametrize("port", ["100", "65536"])
|
@pytest.mark.parametrize("port", ["100", "65536"])
|
||||||
@ -979,5 +974,4 @@ class TestConnectAddressInvalid(TestcaseBase):
|
|||||||
"""
|
"""
|
||||||
address = "{}:{}".format(host, port)
|
address = "{}:{}".format(host, port)
|
||||||
self.connection_wrap.connect(alias=connect_name, address=address, check_task=ct.CheckTasks.err_res,
|
self.connection_wrap.connect(alias=connect_name, address=address, check_task=ct.CheckTasks.err_res,
|
||||||
# return code 2
|
check_items={ct.err_code: 2})
|
||||||
check_items={ct.err_code: 0})
|
|
||||||
Loading…
x
Reference in New Issue
Block a user