未验证 提交 a28b71fd 编写于 作者: J Jin Hai 提交者: GitHub

Merge pull request #518 from del-zhenwu/0.6.0

remove invalid params
......@@ -1208,9 +1208,9 @@ class TestCreateIndexParamsInvalid(object):
nlist = index_params["nlist"]
logging.getLogger().info(index_params)
status, ids = connect.add_vectors(table, vectors)
# if not isinstance(index_type, int) or not isinstance(nlist, int):
with pytest.raises(Exception) as e:
if (not index_type) or (not nlist) or (not isinstance(index_type, IndexType)) or (not isinstance(nlist, int)):
with pytest.raises(Exception) as e:
status = connect.create_index(table, index_params)
else:
status = connect.create_index(table, index_params)
# else:
# status = connect.create_index(table, index_params)
# assert not status.OK()
assert not status.OK()
......@@ -54,12 +54,12 @@ def gen_long_str(num):
def gen_invalid_ips():
ips = [
"255.0.0.0",
"255.255.0.0",
"255.255.255.0",
"255.255.255.255",
# "255.0.0.0",
# "255.255.0.0",
# "255.255.255.0",
# "255.255.255.255",
"127.0.0",
"123.0.0.2",
# "123.0.0.2",
"12-s",
" ",
"12 s",
......@@ -114,12 +114,12 @@ def gen_invalid_uris():
# invalid ip
"tcp:// :%s" % port,
"tcp://123.0.0.1:%s" % port,
# "tcp://123.0.0.1:%s" % port,
"tcp://127.0.0:%s" % port,
"tcp://255.0.0.0:%s" % port,
"tcp://255.255.0.0:%s" % port,
"tcp://255.255.255.0:%s" % port,
"tcp://255.255.255.255:%s" % port,
# "tcp://255.255.0.0:%s" % port,
# "tcp://255.255.255.0:%s" % port,
# "tcp://255.255.255.255:%s" % port,
"tcp://\n:%s" % port,
]
......@@ -263,9 +263,7 @@ def gen_invalid_index_types():
def gen_invalid_nlists():
nlists = [
0,
-1,
1000000000000001,
# None,
[1,2,3],
(1,2),
......@@ -549,4 +547,4 @@ if __name__ == "__main__":
p.join()
time.sleep(3)
status, count = milvus.get_table_row_count(table)
assert count == process_num * loop_num
\ No newline at end of file
assert count == process_num * loop_num
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册