mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-01 03:18:29 +08:00
re-define case level
Former-commit-id: 6c2ae8329c1ea9e22f0cba75d6603987a874b8c8
This commit is contained in:
parent
581c662b61
commit
c01107e2c7
@ -407,6 +407,7 @@ class TestAddBase:
|
||||
def get_vector_id(self, request):
|
||||
yield request.param
|
||||
|
||||
@pytest.mark.level(2)
|
||||
def test_add_vectors_ids_invalid(self, connect, table, get_vector_id):
|
||||
'''
|
||||
target: test add vectors in table, use customize ids, which are not int64
|
||||
@ -974,6 +975,7 @@ class TestAddIP:
|
||||
def get_vector_id(self, request):
|
||||
yield request.param
|
||||
|
||||
@pytest.mark.level(2)
|
||||
def test_add_vectors_ids_invalid(self, connect, ip_table, get_vector_id):
|
||||
'''
|
||||
target: test add vectors in table, use customize ids, which are not int64
|
||||
@ -1223,7 +1225,7 @@ class TestAddTableVectorsInvalid(object):
|
||||
with pytest.raises(Exception) as e:
|
||||
status, result = connect.add_vectors(table, tmp_single_vector)
|
||||
|
||||
@pytest.mark.level(1)
|
||||
@pytest.mark.level(2)
|
||||
def test_add_vectors_with_invalid_vectors(self, connect, table, gen_vector):
|
||||
tmp_vectors = copy.deepcopy(self.vectors)
|
||||
tmp_vectors[1][1] = gen_vector
|
||||
|
@ -528,7 +528,7 @@ class TestIndexIP:
|
||||
The following cases are used to test `create_index` function
|
||||
******************************************************************
|
||||
"""
|
||||
|
||||
@pytest.mark.level(2)
|
||||
@pytest.mark.timeout(BUILD_TIMEOUT)
|
||||
def test_create_index(self, connect, ip_table, get_index_params):
|
||||
'''
|
||||
@ -563,6 +563,7 @@ class TestIndexIP:
|
||||
logging.getLogger().info(index_params)
|
||||
status, ids = connect.add_vectors(ip_table, vectors)
|
||||
status = connect.create_index(ip_table, index_params)
|
||||
assert status.OK()
|
||||
logging.getLogger().info(connect.describe_index(ip_table))
|
||||
query_vecs = [vectors[0], vectors[1], vectors[2]]
|
||||
top_k = 5
|
||||
@ -933,19 +934,19 @@ class TestIndexTableInvalid(object):
|
||||
def get_table_name(self, request):
|
||||
yield request.param
|
||||
|
||||
# @pytest.mark.level(1)
|
||||
@pytest.mark.level(2)
|
||||
def test_create_index_with_invalid_tablename(self, connect, get_table_name):
|
||||
table_name = get_table_name
|
||||
status = connect.create_index(table_name, random.choice(gen_index_params()))
|
||||
assert not status.OK()
|
||||
|
||||
# @pytest.mark.level(1)
|
||||
@pytest.mark.level(2)
|
||||
def test_describe_index_with_invalid_tablename(self, connect, get_table_name):
|
||||
table_name = get_table_name
|
||||
status, result = connect.describe_index(table_name)
|
||||
assert not status.OK()
|
||||
|
||||
# @pytest.mark.level(1)
|
||||
@pytest.mark.level(2)
|
||||
def test_drop_index_with_invalid_tablename(self, connect, get_table_name):
|
||||
table_name = get_table_name
|
||||
status = connect.drop_index(table_name)
|
||||
|
Loading…
Reference in New Issue
Block a user