mirror of https://github.com/milvus-io/milvus.git
Update regression tests
Signed-off-by: cai.zhang <cai.zhang@zilliz.com>pull/4973/head^2
parent
23aebe7e2a
commit
6c520a725d
|
@ -4,5 +4,5 @@ numpy==1.18.1
|
||||||
pytest==5.3.4
|
pytest==5.3.4
|
||||||
pytest-cov==2.8.1
|
pytest-cov==2.8.1
|
||||||
pytest-timeout==1.3.4
|
pytest-timeout==1.3.4
|
||||||
pymilvus-distributed==0.0.1
|
pymilvus-distributed==0.0.2
|
||||||
sklearn==0.0
|
sklearn==0.0
|
||||||
|
|
|
@ -563,7 +563,7 @@ class TestInsertBase:
|
||||||
milvus.flush([collection])
|
milvus.flush([collection])
|
||||||
|
|
||||||
for i in range(thread_num):
|
for i in range(thread_num):
|
||||||
t = TestThread(target=insert, args=(i,))
|
t = MilvusTestThread(target=insert, args=(i,))
|
||||||
threads.append(t)
|
threads.append(t)
|
||||||
t.start()
|
t.start()
|
||||||
for t in threads:
|
for t in threads:
|
||||||
|
@ -817,7 +817,6 @@ class TestInsertAsync:
|
||||||
future.result()
|
future.result()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skip
|
|
||||||
class TestInsertMultiCollections:
|
class TestInsertMultiCollections:
|
||||||
"""
|
"""
|
||||||
******************************************************************
|
******************************************************************
|
||||||
|
@ -959,7 +958,6 @@ class TestInsertMultiCollections:
|
||||||
result = connect.search(collection_name, default_single_query)
|
result = connect.search(collection_name, default_single_query)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skip
|
|
||||||
class TestInsertInvalid(object):
|
class TestInsertInvalid(object):
|
||||||
"""
|
"""
|
||||||
Test inserting vectors with invalid collection names
|
Test inserting vectors with invalid collection names
|
||||||
|
|
|
@ -4,7 +4,6 @@ from .constants import *
|
||||||
|
|
||||||
uid = "create_collection"
|
uid = "create_collection"
|
||||||
|
|
||||||
|
|
||||||
class TestCreateCollection:
|
class TestCreateCollection:
|
||||||
"""
|
"""
|
||||||
******************************************************************
|
******************************************************************
|
||||||
|
|
|
@ -55,7 +55,7 @@ class TestHasCollection:
|
||||||
assert connect.has_collection(collection_name)
|
assert connect.has_collection(collection_name)
|
||||||
# assert not assert_collection(connect, collection_name)
|
# assert not assert_collection(connect, collection_name)
|
||||||
for i in range(threads_num):
|
for i in range(threads_num):
|
||||||
t = TestThread(target=has, args=())
|
t = MilvusTestThread(target=has, args=())
|
||||||
threads.append(t)
|
threads.append(t)
|
||||||
t.start()
|
t.start()
|
||||||
time.sleep(0.2)
|
time.sleep(0.2)
|
||||||
|
|
|
@ -20,6 +20,7 @@ class TestCreateBase:
|
||||||
|
|
||||||
@pytest.mark.level(2)
|
@pytest.mark.level(2)
|
||||||
@pytest.mark.timeout(600)
|
@pytest.mark.timeout(600)
|
||||||
|
@pytest.mark.skip
|
||||||
def test_create_partition_limit(self, connect, collection, args):
|
def test_create_partition_limit(self, connect, collection, args):
|
||||||
'''
|
'''
|
||||||
target: test create partitions, check status returned
|
target: test create partitions, check status returned
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -235,7 +235,7 @@ def gen_single_filter_fields():
|
||||||
def gen_single_vector_fields():
|
def gen_single_vector_fields():
|
||||||
fields = []
|
fields = []
|
||||||
for data_type in [DataType.FLOAT_VECTOR, DataType.BINARY_VECTOR]:
|
for data_type in [DataType.FLOAT_VECTOR, DataType.BINARY_VECTOR]:
|
||||||
field = {"name": data_type.name, "type": data_type, "params": {"dim": default_dim}}
|
field = {"name": data_type.name, "type": data_type, "params": {"dim": default_dim}, "indexes": [{"metric_type": "L2"}]}
|
||||||
fields.append(field)
|
fields.append(field)
|
||||||
return fields
|
return fields
|
||||||
|
|
||||||
|
@ -243,9 +243,11 @@ def gen_single_vector_fields():
|
||||||
def gen_default_fields(auto_id=True):
|
def gen_default_fields(auto_id=True):
|
||||||
default_fields = {
|
default_fields = {
|
||||||
"fields": [
|
"fields": [
|
||||||
{"name": "int64", "type": DataType.INT64},
|
{"name": "int64", "type": DataType.INT64, "is_primary_key": not auto_id},
|
||||||
{"name": "float", "type": DataType.FLOAT},
|
{"name": "float", "type": DataType.FLOAT},
|
||||||
{"name": default_float_vec_field_name, "type": DataType.FLOAT_VECTOR, "params": {"dim": default_dim}},
|
{"name": default_float_vec_field_name, "type": DataType.FLOAT_VECTOR,
|
||||||
|
"params": {"dim": default_dim},
|
||||||
|
"indexes": [{"metric_type": "L2"}]},
|
||||||
],
|
],
|
||||||
"segment_row_limit": default_segment_row_limit,
|
"segment_row_limit": default_segment_row_limit,
|
||||||
"auto_id": auto_id
|
"auto_id": auto_id
|
||||||
|
@ -974,19 +976,19 @@ def restart_server(helm_release_name):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
class TestThread(threading.Thread):
|
class MilvusTestThread(threading.Thread):
|
||||||
def __init__(self, target, args=()):
|
def __init__(self, target, args=()):
|
||||||
threading.Thread.__init__(self, target=target, args=args)
|
threading.Thread.__init__(self, target=target, args=args)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.exc = None
|
self.exc = None
|
||||||
try:
|
try:
|
||||||
super(TestThread, self).run()
|
super(MilvusTestThread, self).run()
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
self.exc = e
|
self.exc = e
|
||||||
|
|
||||||
def join(self):
|
def join(self):
|
||||||
super(TestThread, self).join()
|
super(MilvusTestThread, self).join()
|
||||||
if self.exc:
|
if self.exc:
|
||||||
raise self.exc
|
raise self.exc
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue