[skip ci]Add levels for pymilvus tests (#7031)

Signed-off-by: yanliang567 <yanliang.qiao@zilliz.com>
pull/7034/head
yanliang567 2021-08-10 15:59:27 +08:00 committed by GitHub
parent 17ac9ca07e
commit 51529a2638
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 298 additions and 213 deletions

View File

@ -152,6 +152,7 @@ class TestCollectionCount:
stats = connect.get_collection_stats(collection)
assert stats[row_count] == insert_count
@pytest.mark.tags(CaseLabel.L2)
def test_count_without_connection(self, collection, dis_connect):
'''
target: test count_entities, without connection
@ -201,6 +202,7 @@ class TestCollectionCountIP:
request.param.update({"metric_type": "IP"})
return request.param
@pytest.mark.tags(CaseLabel.L2)
def test_collection_count_after_index_created(self, connect, collection, get_simple_index, insert_count):
'''
target: test count_entities, after index have been created
@ -293,7 +295,7 @@ class TestCollectionCountBinary:
stats = connect.get_collection_stats(binary_collection)
assert stats[row_count] == insert_count
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_collection_count_multi_partitions_A(self, connect, binary_collection, insert_count):
# '''
# target: test collection rows_count is correct or not
@ -312,7 +314,7 @@ class TestCollectionCountBinary:
# stats = connect.get_collection_stats(binary_collection)
# assert stats[row_count] == insert_count
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_collection_count_multi_partitions_B(self, connect, binary_collection, insert_count):
# '''
# target: test collection rows_count is correct or not
@ -350,7 +352,7 @@ class TestCollectionCountBinary:
# stats = connect.get_collection_stats(binary_collection)
# assert stats[row_count] == insert_count * 2
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_collection_count_multi_partitions_D(self, connect, binary_collection, insert_count):
# '''
# target: test collection rows_count is correct or not
@ -386,6 +388,7 @@ class TestCollectionCountBinary:
assert stats[row_count] == insert_count
# TODO: need to update and enable
@pytest.mark.tags(CaseLabel.L2)
def test_collection_count_after_index_created_A(self, connect, binary_collection, get_hamming_index, insert_count):
'''
target: test count_entities, after index have been created
@ -400,6 +403,7 @@ class TestCollectionCountBinary:
stats = connect.get_collection_stats(binary_collection)
assert stats[row_count] == insert_count
@pytest.mark.tags(CaseLabel.L2)
def test_collection_count_no_entities(self, connect, binary_collection):
'''
target: test collection rows_count is correct or not, if collection is empty
@ -449,7 +453,7 @@ class TestCollectionMultiCollections:
assert stats[row_count] == insert_count
connect.drop_collection(collection_list[i])
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_collection_count_multi_collections_binary(self, connect, binary_collection, insert_count):
'''
target: test collection rows_count is correct or not with multiple collections of JACCARD
@ -472,8 +476,7 @@ class TestCollectionMultiCollections:
assert stats[row_count] == insert_count
connect.drop_collection(collection_list[i])
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.L2)
def test_collection_count_multi_collections_mix(self, connect):
'''
target: test collection rows_count is correct or not with multiple collections of JACCARD

View File

@ -67,7 +67,7 @@ def gen_sequence():
class TestCollectionLogic(object):
@pytest.mark.parametrize("logic_seq", gen_sequence())
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def _test_logic(self, connect, logic_seq, args):
if args["handler"] == "HTTP":
pytest.skip("Skip in http mode")

View File

@ -69,7 +69,7 @@ class TestGetCollectionStats:
with pytest.raises(Exception) as e:
connect.get_collection_stats(collection_name)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_get_collection_stats_name_invalid(self, connect, get_invalid_collection_name):
'''
target: get collection stats where collection name is invalid
@ -91,6 +91,7 @@ class TestGetCollectionStats:
connect.flush([collection])
assert stats[row_count] == 0
@pytest.mark.tags(CaseLabel.L2)
def test_get_collection_stats_without_connection(self, collection, dis_connect):
'''
target: test count_entities, without connection
@ -127,6 +128,7 @@ class TestGetCollectionStats:
stats = connect.get_collection_stats(collection)
assert stats[row_count] == nb
@pytest.mark.tags(CaseLabel.L2)
def _test_get_collection_stats_after_delete(self, connect, collection):
'''
target: get row count with collection_stats
@ -144,7 +146,7 @@ class TestGetCollectionStats:
assert stats["partitions"][0]["segments"][0]["data_size"] > 0
# TODO: enable
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def _test_get_collection_stats_after_compact_parts(self, connect, collection):
'''
target: get row count with collection_stats
@ -167,6 +169,7 @@ class TestGetCollectionStats:
compact_after = stats["partitions"][0]["segments"][0]["data_size"]
assert compact_before == compact_after
@pytest.mark.tags(CaseLabel.L2)
def _test_get_collection_stats_after_compact_delete_one(self, connect, collection):
'''
target: get row count with collection_stats
@ -188,6 +191,7 @@ class TestGetCollectionStats:
# pdb.set_trace()
assert compact_before == compact_after
@pytest.mark.tags(CaseLabel.L2)
def test_get_collection_stats_partition(self, connect, collection):
'''
target: get partition info in a collection
@ -224,6 +228,7 @@ class TestGetCollectionStats:
stats = connect.get_collection_stats(collection)
assert stats[row_count] == default_nb * 3
@pytest.mark.tags(CaseLabel.L2)
def test_get_collection_stats_partitions_A(self, connect, collection, insert_count):
'''
target: test collection rows_count is correct or not
@ -240,6 +245,7 @@ class TestGetCollectionStats:
stats = connect.get_collection_stats(collection)
assert stats[row_count] == insert_count
@pytest.mark.tags(CaseLabel.L2)
def test_get_collection_stats_partitions_B(self, connect, collection, insert_count):
'''
target: test collection rows_count is correct or not
@ -274,6 +280,7 @@ class TestGetCollectionStats:
stats = connect.get_collection_stats(collection)
assert stats[row_count] == insert_count*2
@pytest.mark.tags(CaseLabel.L2)
def test_get_collection_stats_partitions_D(self, connect, collection, insert_count):
'''
target: test collection rows_count is correct or not
@ -306,6 +313,7 @@ class TestGetCollectionStats:
assert stats[row_count] == default_nb
# TODO: assert metric type in stats response
@pytest.mark.tags(CaseLabel.L2)
def test_get_collection_stats_after_index_created_ip(self, connect, collection, get_simple_index):
'''
target: test collection info after index created
@ -322,6 +330,7 @@ class TestGetCollectionStats:
assert stats[row_count] == default_nb
# TODO: assert metric type in stats response
@pytest.mark.tags(CaseLabel.L2)
def test_get_collection_stats_after_index_created_jac(self, connect, binary_collection, get_jaccard_index):
'''
target: test collection info after index created
@ -370,7 +379,7 @@ class TestGetCollectionStats:
assert stats[row_count] == default_nb
connect.drop_collection(collection_list[i])
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_collection_count_multi_collections_indexed(self, connect):
'''
target: test collection rows_count is correct or not with multiple collections of L2

View File

@ -60,6 +60,7 @@ class TestCreateCollection:
connect.create_collection(collection_name, fields)
assert connect.has_collection(collection_name)
@pytest.mark.tags(CaseLabel.L2)
def _test_create_collection_segment_row_limit(self, connect, get_segment_row_limit):
'''
target: test create normal collection with different fields
@ -108,6 +109,7 @@ class TestCreateCollection:
assert message == "Create collection failed: meta table add collection failed,error = collection %s exist" % collection
# TODO: assert exception
@pytest.mark.tags(CaseLabel.L2)
def test_create_collection_without_connection(self, dis_connect):
'''
target: test create collection, without connection
@ -146,7 +148,7 @@ class TestCreateCollection:
time.sleep(2)
connect.create_collection(collection, default_fields)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_create_collection_multithread(self, connect):
'''
target: test create collection with multithread
@ -215,7 +217,7 @@ class TestCreateCollectionInvalid(object):
def get_field_type(self, request):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def _test_create_collection_with_invalid_segment_row_limit(self, connect, get_segment_row_limit):
collection_name = gen_unique_str()
fields = copy.deepcopy(default_fields)
@ -223,7 +225,7 @@ class TestCreateCollectionInvalid(object):
with pytest.raises(Exception) as e:
connect.create_collection(collection_name, fields)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_create_collection_with_invalid_dimension(self, connect, get_dim):
dimension = get_dim
collection_name = gen_unique_str()
@ -232,14 +234,13 @@ class TestCreateCollectionInvalid(object):
with pytest.raises(Exception) as e:
connect.create_collection(collection_name, fields)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.L2)
def test_create_collection_with_invalid_collection_name(self, connect, get_invalid_string):
collection_name = get_invalid_string
with pytest.raises(Exception) as e:
connect.create_collection(collection_name, default_fields)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.parametrize("collection_name", ('', None))
def test_create_collection_with_empty_or_None_collection_name(self, connect, collection_name):
# collection_name = ''
@ -251,6 +252,7 @@ class TestCreateCollectionInvalid(object):
message = getattr(e, 'message', "The exception does not contain the field of message.")
assert message == "Collection name should not be empty"
@pytest.mark.tags(CaseLabel.L2)
def test_create_collection_no_dimension(self, connect):
'''
target: test create collection with no dimension params
@ -268,6 +270,7 @@ class TestCreateCollectionInvalid(object):
message = getattr(e, 'message', "The exception does not contain the field of message.")
assert message == "dimension is not defined in field type params"
@pytest.mark.tags(CaseLabel.L2)
def _test_create_collection_no_segment_row_limit(self, connect):
'''
target: test create collection with no segment_row_limit params
@ -283,6 +286,7 @@ class TestCreateCollectionInvalid(object):
assert res["segment_row_limit"] == default_server_segment_row_limit
# TODO: assert exception
@pytest.mark.tags(CaseLabel.L2)
def test_create_collection_limit_fields(self, connect):
collection_name = gen_unique_str(uid)
limit_num = 64
@ -301,7 +305,7 @@ class TestCreateCollectionInvalid(object):
assert message == "maximum field's number should be limited to 64"
# TODO: assert exception
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_create_collection_invalid_field_name(self, connect, get_invalid_string):
collection_name = gen_unique_str(uid)
fields = copy.deepcopy(default_fields)
@ -312,6 +316,7 @@ class TestCreateCollectionInvalid(object):
connect.create_collection(collection_name, fields)
# TODO: assert exception
@pytest.mark.tags(CaseLabel.L2)
def test_create_collection_invalid_field_type(self, connect, get_field_type):
collection_name = gen_unique_str(uid)
fields = copy.deepcopy(default_fields)

View File

@ -73,7 +73,7 @@ class TestDescribeCollection:
assert index["metric_type"] == get_simple_index["metric_type"]
assert index["params"] == get_simple_index["params"]
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_describe_collection_without_connection(self, collection, dis_connect):
'''
target: test get collection info, without connection
@ -103,7 +103,7 @@ class TestDescribeCollection:
message = getattr(e, 'message', "The exception does not contain the field of message.")
assert message == "describe collection failed: can't find collection: %s" % collection_name
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_describe_collection_multithread(self, connect):
'''
target: test create collection with multithread
@ -171,13 +171,13 @@ class TestDescribeCollectionInvalid(object):
def get_collection_name(self, request):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_describe_collection_with_invalid_collection_name(self, connect, get_collection_name):
collection_name = get_collection_name
with pytest.raises(Exception) as e:
connect.describe_collection(collection_name)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.parametrize("collection_name", ('', None))
def test_describe_collection_with_empty_or_None_collection_name(self, connect, collection_name):
with pytest.raises(Exception) as e:

View File

@ -29,6 +29,7 @@ class TestDropCollection:
time.sleep(2)
assert not connect.has_collection(collection)
@pytest.mark.tags(CaseLabel.L2)
def test_drop_collection_without_connection(self, collection, dis_connect):
'''
target: test describe collection, without connection
@ -55,8 +56,7 @@ class TestDropCollection:
message = getattr(e, 'message', "The exception does not contain the field of message.")
assert message == "describe collection failed: can't find collection: %s" % collection_name
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.L2)
def test_create_drop_collection_multithread(self, connect):
'''
target: test create and drop collection with multithread
@ -95,12 +95,13 @@ class TestDropCollectionInvalid(object):
def get_collection_name(self, request):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_drop_collection_with_invalid_collection_name(self, connect, get_collection_name):
collection_name = get_collection_name
with pytest.raises(Exception) as e:
connect.has_collection(collection_name)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.parametrize("collection_name", ('', None))
def test_drop_collection_with_empty_or_None_collection_name(self, connect, collection_name):
with pytest.raises(Exception) as e:

View File

@ -26,7 +26,7 @@ class TestHasCollection:
'''
assert connect.has_collection(collection)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_has_collection_without_connection(self, collection, dis_connect):
'''
target: test has collection, without connection
@ -50,7 +50,7 @@ class TestHasCollection:
connect.drop_collection(collection_name)
assert not connect.has_collection(collection_name)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_has_collection_multithread(self, connect):
'''
target: test create collection with multithread
@ -85,19 +85,19 @@ class TestHasCollectionInvalid(object):
def get_collection_name(self, request):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_has_collection_with_invalid_collection_name(self, connect, get_collection_name):
collection_name = get_collection_name
with pytest.raises(Exception) as e:
connect.has_collection(collection_name)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_has_collection_with_empty_collection_name(self, connect):
collection_name = ''
with pytest.raises(Exception) as e:
connect.has_collection(collection_name)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_has_collection_with_none_collection_name(self, connect):
collection_name = None
with pytest.raises(Exception) as e:

View File

@ -38,7 +38,7 @@ class TestListCollections:
for i in range(collection_num):
connect.drop_collection(collection_names[i])
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_list_collections_without_connection(self, dis_connect):
'''
target: test list collections, without connection
@ -48,6 +48,7 @@ class TestListCollections:
with pytest.raises(Exception) as e:
dis_connect.list_collections()
@pytest.mark.tags(CaseLabel.L2)
def test_list_collections_not_existed(self, connect):
'''
target: test if collection not created
@ -63,7 +64,7 @@ class TestListCollections:
# TODO: make sure to run this case in the end
@pytest.mark.skip("r0.3-test")
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_list_collections_no_collection(self, connect):
'''
target: test show collections is correct or not, if no collection in db
@ -76,7 +77,7 @@ class TestListCollections:
for collection_name in result:
assert connect.has_collection(collection_name)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_list_collections_multithread(self, connect):
'''
target: test list collection with multithread

View File

@ -49,7 +49,7 @@ class TestLoadCollection:
connect.load_collection(collection)
connect.release_collection(collection)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_load_collection_after_index_binary(self, connect, binary_collection, get_binary_index):
'''
target: test load binary_collection, after index created
@ -83,7 +83,7 @@ class TestLoadCollection:
connect.load_collection(collection)
connect.release_collection(collection)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_load_collection_dis_connect(self, dis_connect, collection):
'''
target: test load collection, without connection
@ -93,7 +93,7 @@ class TestLoadCollection:
with pytest.raises(Exception) as e:
dis_connect.load_collection(collection)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_release_collection_dis_connect(self, dis_connect, collection):
'''
target: test release collection, without connection
@ -103,7 +103,7 @@ class TestLoadCollection:
with pytest.raises(Exception) as e:
dis_connect.release_collection(collection)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_load_collection_not_existed(self, connect, collection):
collection_name = gen_unique_str(uid)
try:
@ -114,7 +114,7 @@ class TestLoadCollection:
message = getattr(e, 'message', "The exception does not contain the field of message.")
assert message == "describe collection failed: can't find collection: %s" % collection_name
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_release_collection_not_existed(self, connect, collection):
collection_name = gen_unique_str(uid)
try:
@ -146,6 +146,7 @@ class TestLoadCollection:
connect.release_collection(collection)
connect.load_collection(collection)
@pytest.mark.tags(CaseLabel.L2)
def test_load_collection_repeatedly(self, connect, collection):
ids = connect.insert(collection, default_entities)
assert len(ids) == default_nb
@ -153,7 +154,7 @@ class TestLoadCollection:
connect.load_collection(collection)
connect.load_collection(collection)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_load_release_collection(self, connect, collection):
collection_name = gen_unique_str(uid)
connect.create_collection(collection_name, default_fields)
@ -210,6 +211,7 @@ class TestLoadCollection:
connect.load_collection(collection)
# TODO
@pytest.mark.tags(CaseLabel.L2)
def _test_load_collection_larger_than_memory(self):
"""
target: test load collection when memory less than collection size
@ -237,6 +239,7 @@ class TestLoadCollection:
res = connect.search(collection, default_single_query, partition_names=[default_partition_name])
assert len(res[0]) == default_top_k
@pytest.mark.tags(CaseLabel.L2)
def test_load_collection_release_all_partitions(self, connect, collection):
"""
target: test release all partitions after load collection
@ -292,6 +295,7 @@ class TestReleaseAdvanced:
with pytest.raises(Exception):
connect.search(collection, default_single_query)
@pytest.mark.tags(CaseLabel.L2)
def test_release_partition_during_searching(self, connect, collection):
"""
target: test release partition during searching
@ -415,13 +419,13 @@ class TestLoadCollectionInvalid(object):
def get_collection_name(self, request):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_load_collection_with_invalid_collection_name(self, connect, get_collection_name):
collection_name = get_collection_name
with pytest.raises(Exception) as e:
connect.load_collection(collection_name)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_release_collection_with_invalid_collection_name(self, connect, get_collection_name):
collection_name = get_collection_name
with pytest.raises(Exception) as e:
@ -474,7 +478,6 @@ class TestLoadPartition:
res = connect.search(collection, query, partition_names=[default_tag])
assert len(res[0]) == default_top_k
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_load_partition_after_index_binary(self, connect, binary_collection, get_binary_index):
'''
@ -508,7 +511,7 @@ class TestLoadPartition:
res = connect.search(collection, default_single_query)
assert len(res[0]) == 0
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_load_collection_dis_connect(self, connect, dis_connect, collection):
'''
target: test load collection, without connection
@ -519,7 +522,7 @@ class TestLoadPartition:
with pytest.raises(Exception) as e:
dis_connect.load_partitions(collection, [default_tag])
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_release_partition_dis_connect(self, connect, dis_connect, collection):
'''
target: test release collection, without connection
@ -531,7 +534,6 @@ class TestLoadPartition:
with pytest.raises(Exception) as e:
dis_connect.release_partitions(collection, [default_tag])
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_load_partition_not_existed(self, connect, collection):
partition_name = gen_unique_str(uid)
@ -543,8 +545,7 @@ class TestLoadPartition:
message = getattr(e, 'message', "The exception does not contain the field of message.")
assert message == "partitionID of partitionName:%s can not be find" % partition_name
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.L2)
def test_release_partition_not_existed(self, connect, collection):
partition_name = gen_unique_str(uid)
try:
@ -568,7 +569,7 @@ class TestLoadPartition:
connect.flush([collection])
connect.release_partitions(collection, [default_tag])
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_load_release_after_drop(self, connect, collection):
connect.create_partition(collection, default_tag)
ids = connect.insert(collection, default_entities, partition_name=default_tag)
@ -657,13 +658,13 @@ class TestLoadPartitionInvalid(object):
def get_partition_name(self, request):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_load_partition_with_invalid_partition_name(self, connect, collection, get_partition_name):
partition_name = get_partition_name
with pytest.raises(Exception) as e:
connect.load_partitions(collection, [partition_name])
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_release_partition_with_invalid_partition_name(self, connect, collection, get_partition_name):
partition_name = get_partition_name
with pytest.raises(Exception) as e:

View File

@ -294,7 +294,7 @@ default_single_query = {
# assert res_get[0] is None
#
# # TODO: disable
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def _test_index_insert_single_delete_get(self, connect, id_collection):
# '''
# method: insert entities, and delete
@ -455,7 +455,7 @@ default_single_query = {
# def get_collection_name(self, request):
# yield request.param
#
# @pytest.mark.level(1)
# @pytest.mark.tags(CaseLabel.L1)
# def test_delete_entity_id_invalid(self, connect, collection, gen_entity_id):
# invalid_id = gen_entity_id
# with pytest.raises(Exception) as e:
@ -466,7 +466,7 @@ default_single_query = {
# with pytest.raises(Exception) as e:
# status = connect.delete_entity_by_id(collection, [1, invalid_id])
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_delete_entity_with_invalid_collection_name(self, connect, get_collection_name):
# collection_name = get_collection_name
# with pytest.raises(Exception) as e:

View File

@ -252,7 +252,7 @@ default_single_query = {
# for i in range(get_pos, get_pos * 2):
# assert_equal_vector(res[i].get(default_float_vec_field_name), new_entities[-1]["values"][i - get_pos])
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_entities_indexed_tag(self, connect, collection, get_simple_index, get_pos):
# '''
# target: test.get_entity_by_id
@ -432,7 +432,7 @@ default_single_query = {
# for i in range(get_pos):
# assert_equal_vector(res[i].get(default_float_vec_field_name), default_entities[-1]["values"][i])
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_entities_indexed_single(self, connect, collection, get_simple_index, get_pos):
# '''
# target: test.get_entity_by_id
@ -533,7 +533,7 @@ default_single_query = {
# for future in concurrent.futures.as_completed(future_results):
# future.result()
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_entity_by_id_insert_multi_threads(self, connect, collection):
# '''
# target: test.get_entity_by_id
@ -565,7 +565,7 @@ default_single_query = {
# future = executor.submit(fun)
# future.result()
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_entity_by_id_insert_multi_threads_2(self, connect, collection):
# '''
# target: test.get_entity_by_id
@ -625,7 +625,7 @@ default_single_query = {
# def get_entity_id(self, request):
# yield request.param
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_insert_ids_invalid(self, connect, collection, get_entity_id):
# '''
# target: test insert, with using customize ids, which are not int64
@ -637,7 +637,7 @@ default_single_query = {
# with pytest.raises(Exception):
# connect.get_entity_by_id(collection, ids)
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_insert_parts_ids_invalid(self, connect, collection, get_entity_id):
# '''
# target: test insert, with using customize ids, which are not int64
@ -650,14 +650,14 @@ default_single_query = {
# with pytest.raises(Exception):
# connect.get_entity_by_id(collection, ids)
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_entities_with_invalid_collection_name(self, connect, get_collection_name):
# collection_name = get_collection_name
# ids = [1]
# with pytest.raises(Exception):
# res = connect.get_entity_by_id(collection_name, ids)
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_entities_with_invalid_field_name(self, connect, collection, get_field_name):
# field_name = get_field_name
# ids = [1]

View File

@ -83,7 +83,7 @@ class TestInsertBase:
with pytest.raises(BaseException) as e:
connect.insert(collection_name, default_entities)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_without_connect(self, dis_connect, collection):
'''
target: test insert entities without connection
@ -93,6 +93,7 @@ class TestInsertBase:
with pytest.raises(Exception) as e:
dis_connect.insert(collection, default_entities)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(ADD_TIMEOUT)
def test_insert_drop_collection(self, connect, collection):
'''
@ -119,6 +120,7 @@ class TestInsertBase:
connect.drop_collection(collection)
assert connect.has_collection(collection) == False
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(ADD_TIMEOUT)
def test_insert_create_index(self, connect, collection, get_simple_index):
'''
@ -165,6 +167,7 @@ class TestInsertBase:
res = connect.search(collection, default_single_query)
assert len(res[0]) == default_top_k
@pytest.mark.tags(CaseLabel.L2)
def _test_insert_segment_row_count(self, connect, collection):
nb = default_segment_row_limit + 1
res_ids = connect.insert(collection, gen_entities(nb))
@ -204,6 +207,7 @@ class TestInsertBase:
stats = connect.get_collection_stats(id_collection)
assert stats[row_count] == nb
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(ADD_TIMEOUT)
def test_insert_the_same_ids(self, connect, id_collection, insert_count):
'''
@ -248,6 +252,7 @@ class TestInsertBase:
stats = connect.get_collection_stats(collection_name)
assert stats[row_count] == nb
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(ADD_TIMEOUT)
def test_insert_ids_not_match(self, connect, id_collection, insert_count):
'''
@ -278,6 +283,7 @@ class TestInsertBase:
del entities[0]
connect.insert(id_collection, entities)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(ADD_TIMEOUT)
def test_insert_not_ids(self, connect, id_collection):
'''
@ -305,6 +311,7 @@ class TestInsertBase:
with pytest.raises(Exception) as e:
connect.insert(id_collection, entities)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(ADD_TIMEOUT)
def test_insert_ids_length_not_match_single(self, connect, id_collection):
'''
@ -367,6 +374,7 @@ class TestInsertBase:
assert stats[row_count] == default_nb
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_partition_not_existed(self, connect, collection):
'''
target: test insert entities in collection created before
@ -378,6 +386,7 @@ class TestInsertBase:
connect.insert(collection, default_entities, partition_name=tag)
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_partition_repeatedly(self, connect, collection):
'''
target: test insert entities in collection created before
@ -415,7 +424,7 @@ class TestInsertBase:
with pytest.raises(Exception):
connect.insert(collection, tmp_entity)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_with_field_type_not_match(self, connect, collection):
'''
target: test insert entities, with the entity field type updated
@ -426,7 +435,7 @@ class TestInsertBase:
with pytest.raises(Exception):
connect.insert(collection, tmp_entity)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_with_field_value_not_match(self, connect, collection):
'''
target: test insert entities, with the entity field value updated
@ -518,7 +527,7 @@ class TestInsertBase:
connect.insert(collection, tmp_entity)
# todo fix timeout
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(30)
def test_collection_insert_rows_count_multi_threading(self, args, collection):
'''
@ -548,7 +557,7 @@ class TestInsertBase:
assert stats[row_count] == thread_num * default_nb
# TODO: unable to set config
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def _test_insert_disable_auto_flush(self, connect, collection):
'''
target: test insert entities, with disable autoflush
@ -600,6 +609,7 @@ class TestInsertBinary:
stats = connect.get_collection_stats(binary_collection)
assert stats[row_count] == default_nb
@pytest.mark.tags(CaseLabel.L2)
def test_insert_binary_multi_times(self, connect, binary_collection):
'''
target: test insert entities multi times and final flush
@ -629,6 +639,7 @@ class TestInsertBinary:
assert index == get_binary_index
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_binary_create_index(self, connect, binary_collection, get_binary_index):
'''
target: test build index insert after vector
@ -697,7 +708,7 @@ class TestInsertAsync:
connect.flush([collection])
assert len(ids) == nb
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_async_false(self, connect, collection, insert_count):
'''
target: test insert vectors with different length of vectors
@ -723,7 +734,7 @@ class TestInsertAsync:
ids = future.result()
assert len(ids) == nb
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_async_long(self, connect, collection):
'''
target: test insert vectors with different length of vectors
@ -739,7 +750,7 @@ class TestInsertAsync:
logging.getLogger().info(stats)
assert stats[row_count] == nb
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_async_callback_timeout(self, connect, collection):
'''
target: test insert vectors with different length of vectors
@ -765,6 +776,7 @@ class TestInsertAsync:
ids = future.result()
# 1339
@pytest.mark.tags(CaseLabel.L2)
def test_insert_async_invalid_params_raise_exception(self, connect, collection):
'''
target: test insert vectors with different length of vectors
@ -796,6 +808,7 @@ class TestInsertMultiCollections:
# pytest.skip("sq8h not support in CPU mode")
return request.param
@pytest.mark.tags(CaseLabel.L2)
def test_insert_entity_multi_collections(self, connect):
'''
target: test insert entities
@ -871,6 +884,7 @@ class TestInsertMultiCollections:
assert stats[row_count] == 1
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_entity_sleep_create_index_another(self, connect, collection, get_simple_index):
'''
target: test insert vector to collection_2 after build index for collection_1 for a while
@ -886,6 +900,7 @@ class TestInsertMultiCollections:
assert stats[row_count] == 1
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.L2)
def test_search_entity_insert_entity_another(self, connect, collection):
'''
target: test insert entity to collection_1 after search collection_2
@ -920,6 +935,7 @@ class TestInsertMultiCollections:
assert stats[row_count] == 1
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_entity_sleep_search_entity_another(self, connect, collection):
'''
target: test insert entity to collection_1 after search collection_2 a while
@ -935,6 +951,7 @@ class TestInsertMultiCollections:
assert len(res[0]) == 0
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.L2)
def _test_insert_entity_during_release_collection(self, connect, collection):
'''
target: test insert entity during release
@ -1009,6 +1026,7 @@ class TestInsertInvalid(object):
def get_field_vectors_value(self, request):
yield request.param
@pytest.mark.tags(CaseLabel.L2)
def test_insert_ids_invalid(self, connect, id_collection, get_entity_id):
'''
target: test insert, with using customize ids, which are not int64
@ -1020,11 +1038,13 @@ class TestInsertInvalid(object):
with pytest.raises(Exception):
connect.insert(id_collection, default_entities, ids)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_with_invalid_collection_name(self, connect, get_collection_name):
collection_name = get_collection_name
with pytest.raises(Exception):
connect.insert(collection_name, default_entity)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_with_invalid_partition_name(self, connect, collection, get_tag_name):
tag_name = get_tag_name
connect.create_partition(collection, default_tag)
@ -1034,23 +1054,27 @@ class TestInsertInvalid(object):
else:
connect.insert(collection, default_entity, partition_name=tag_name)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_with_invalid_field_name(self, connect, collection, get_field_name):
tmp_entity = update_field_name(copy.deepcopy(default_entity), "int64", get_field_name)
with pytest.raises(Exception):
connect.insert(collection, tmp_entity)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_with_invalid_field_type(self, connect, collection, get_field_type):
field_type = get_field_type
tmp_entity = update_field_type(copy.deepcopy(default_entity), 'float', field_type)
with pytest.raises(Exception):
connect.insert(collection, tmp_entity)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_with_invalid_field_value(self, connect, collection, get_field_int_value):
field_value = get_field_int_value
tmp_entity = update_field_type(copy.deepcopy(default_entity), 'int64', field_value)
with pytest.raises(Exception):
connect.insert(collection, tmp_entity)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_with_invalid_field_entity_value(self, connect, collection, get_field_vectors_value):
tmp_entity = copy.deepcopy(default_entity)
src_vector = tmp_entity[-1]["values"]
@ -1113,19 +1137,19 @@ class TestInsertInvalidBinary(object):
def get_field_vectors_value(self, request):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_with_invalid_field_name(self, connect, binary_collection, get_field_name):
tmp_entity = update_field_name(copy.deepcopy(default_binary_entity), "int64", get_field_name)
with pytest.raises(Exception):
connect.insert(binary_collection, tmp_entity)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_with_invalid_field_value(self, connect, binary_collection, get_field_int_value):
tmp_entity = update_field_type(copy.deepcopy(default_binary_entity), 'int64', get_field_int_value)
with pytest.raises(Exception):
connect.insert(binary_collection, tmp_entity)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_with_invalid_field_entity_value(self, connect, binary_collection, get_field_vectors_value):
tmp_entity = copy.deepcopy(default_binary_entity)
src_vectors = tmp_entity[-1]["values"]
@ -1133,7 +1157,7 @@ class TestInsertInvalidBinary(object):
with pytest.raises(Exception):
connect.insert(binary_collection, tmp_entity)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_ids_invalid(self, connect, binary_id_collection, get_entity_id):
'''
target: test insert, with using customize ids, which are not int64
@ -1145,14 +1169,14 @@ class TestInsertInvalidBinary(object):
with pytest.raises(Exception):
connect.insert(binary_id_collection, default_binary_entities, ids)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_with_invalid_field_type(self, connect, binary_collection, get_field_type):
field_type = get_field_type
tmp_entity = update_field_type(copy.deepcopy(default_binary_entity), 'int64', field_type)
with pytest.raises(Exception):
connect.insert(binary_collection, tmp_entity)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_with_invalid_field_entities_value(self, connect, binary_collection, get_field_vectors_value):
tmp_entities = copy.deepcopy(default_binary_entities)
src_vector = tmp_entities[-1]["values"]

View File

@ -62,7 +62,7 @@ uid = "list_id_in_segment"
# def get_collection_name(self, request):
# yield request.param
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_list_id_in_segment_collection_name_invalid(self, connect, collection, get_collection_name):
# '''
# target: get vector ids where collection name is invalid
@ -96,7 +96,7 @@ uid = "list_id_in_segment"
# with pytest.raises(Exception) as e:
# vector_ids = connect.list_id_in_segment(collection, seg_id + 10000)
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_list_id_in_segment_without_index_A(self, connect, collection):
# '''
# target: get vector ids when there is no index
@ -110,7 +110,7 @@ uid = "list_id_in_segment"
# assert len(vector_ids) == nb
# assert vector_ids[0] == ids[0]
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_list_id_in_segment_without_index_B(self, connect, collection):
# '''
# target: get vector ids when there is no index but with partition
@ -140,7 +140,7 @@ uid = "list_id_in_segment"
# pytest.skip("CPU not support index_type: ivf_sq8h")
# return request.param
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_list_id_in_segment_with_index_A(self, connect, collection, get_simple_index):
# '''
# target: get vector ids when there is index
@ -154,7 +154,7 @@ uid = "list_id_in_segment"
# assert False, str(e)
# # TODO:
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_list_id_in_segment_with_index_B(self, connect, collection, get_simple_index):
# '''
# target: get vector ids when there is index and with partition
@ -189,7 +189,7 @@ uid = "list_id_in_segment"
# assert len(vector_ids) == 1
# assert vector_ids[0] == ids[1]
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_list_id_in_segment_after_delete_vectors(self, connect, collection):
# '''
# target: get vector ids after vectors are deleted
@ -207,7 +207,7 @@ uid = "list_id_in_segment"
# assert len(vector_ids) == nb - delete_length
# assert vector_ids[0] == ids[delete_length]
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_list_id_in_segment_with_index_ip(self, connect, collection, get_simple_index):
# '''
# target: get vector ids when there is index
@ -227,7 +227,7 @@ uid = "list_id_in_segment"
# The following cases are used to test `list_id_in_segment` function
# ******************************************************************
# """
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_list_id_in_segment_without_index_A(self, connect, binary_collection):
# '''
# target: get vector ids when there is no index
@ -245,7 +245,7 @@ uid = "list_id_in_segment"
# for i in range(nb):
# assert vector_ids[i] == ids[i]
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_list_id_in_segment_without_index_B(self, connect, binary_collection):
# '''
# target: get vector ids when there is no index but with partition

View File

@ -166,6 +166,7 @@ class TestQueryBase:
assert res[index][default_float_field_name] == entities[1]["values"][index]
ut.assert_equal_vector(res[index][ut.default_float_vec_field_name], entities[-1]["values"][index])
@pytest.mark.tags(ut.CaseLabel.L2)
def test_query_after_search(self, connect, collection):
"""
target: test query after search
@ -346,7 +347,6 @@ class TestQueryBase:
assert res[1][default_float_field_name] == binary_entities[1]["values"][0]
assert res[2][ut.default_float_vec_field_name] == binary_entities[2]["values"][0]
@pytest.mark.level(2)
@pytest.mark.tags(ut.CaseLabel.tags_smoke)
def test_query_expr_all_term_array(self, connect, collection):
"""
@ -558,7 +558,7 @@ class TestQueryPartition:
assert res[index][default_float_field_name] == entities[1]["values"][index]
ut.assert_equal_vector(res[index][ut.default_float_vec_field_name], entities[2]["values"][index])
@pytest.mark.xfail(reason="#6075")
@pytest.mark.tags(ut.CaseLabel.L2)
def test_query_empty_partition(self, connect, collection):
"""
target: test query on empty partition

View File

@ -160,6 +160,7 @@ class TestSearchBase:
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.L2)
def test_search_flat_top_k(self, connect, collection, get_nq):
'''
target: test basic search function, all the search params is correct, change top-k value
@ -250,7 +251,7 @@ class TestSearchBase:
assert res2[0][0].id == res[0][1].id
assert res2[0][0].entity.get("int64") == res[0][1].entity.get("int64")
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_after_index(self, connect, collection, get_simple_index, get_top_k, get_nq):
'''
target: test basic search function, all the search params is correct, test all index params, and build
@ -278,6 +279,7 @@ class TestSearchBase:
assert res[0]._distances[0] < epsilon
assert check_id_result(res[0], ids[0])
@pytest.mark.tags(CaseLabel.L2)
def test_search_after_index_different_metric_type(self, connect, collection, get_simple_index):
'''
target: test search with different metric_type
@ -301,7 +303,7 @@ class TestSearchBase:
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_index_empty_partition(self, connect, collection, get_simple_index, get_top_k, get_nq):
'''
target: test basic search function, all the search params is correct, test all index params, and build
@ -334,7 +336,7 @@ class TestSearchBase:
res = connect.search(collection, query, partition_names=[default_tag])
assert len(res[0]) == 0
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(600)
def test_search_index_partition(self, connect, collection, get_simple_index, get_top_k, get_nq):
'''
@ -365,7 +367,7 @@ class TestSearchBase:
assert check_id_result(res[0], ids[0])
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_index_partition_not_existed(self, connect, collection, get_top_k, get_nq, get_simple_index):
'''
target: test basic search function, all the search params is correct, test all index params, and build
@ -385,7 +387,7 @@ class TestSearchBase:
with pytest.raises(Exception) as e:
connect.search(collection, query, partition_names=["new_tag"])
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_index_partitions(self, connect, collection, get_simple_index, get_top_k):
'''
target: test basic search function, all the search params is correct, test all index params, and build
@ -420,7 +422,7 @@ class TestSearchBase:
assert res[1]._distances[0] > epsilon
connect.release_collection(collection)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_index_partitions_B(self, connect, collection, get_simple_index, get_top_k):
'''
target: test basic search function, all the search params is correct, test all index params, and build
@ -461,7 +463,7 @@ class TestSearchBase:
assert res[1]._distances[0] < epsilon
connect.release_collection(collection)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_ip_flat(self, connect, collection, get_simple_index, get_top_k, get_nq):
'''
target: test basic search function, all the search params is correct, change top-k value
@ -478,7 +480,7 @@ class TestSearchBase:
assert res[0]._distances[0] >= 1 - gen_inaccuracy(res[0]._distances[0])
assert check_id_result(res[0], ids[0])
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_ip_after_index(self, connect, collection, get_simple_index, get_top_k, get_nq):
'''
target: test basic search function, all the search params is correct, test all index params, and build
@ -503,7 +505,7 @@ class TestSearchBase:
assert check_id_result(res[0], ids[0])
assert res[0]._distances[0] >= 1 - gen_inaccuracy(res[0]._distances[0])
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_ip_index_empty_partition(self, connect, collection, get_simple_index, get_top_k, get_nq):
'''
target: test basic search function, all the search params is correct, test all index params, and build
@ -536,7 +538,7 @@ class TestSearchBase:
res = connect.search(collection, query, partition_names=[default_tag])
assert len(res[0]) == 0
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_ip_index_partitions(self, connect, collection, get_simple_index, get_top_k):
'''
target: test basic search function, all the search params is correct, test all index params, and build
@ -569,7 +571,7 @@ class TestSearchBase:
# TODO:
# assert res[1]._distances[0] >= 1 - gen_inaccuracy(res[1]._distances[0])
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_without_connect(self, dis_connect, collection):
'''
target: test search vectors without connection
@ -579,6 +581,7 @@ class TestSearchBase:
with pytest.raises(Exception) as e:
res = dis_connect.search(collection, default_query)
@pytest.mark.tags(CaseLabel.L2)
def test_search_collection_not_existed(self, connect):
'''
target: search collection not existed
@ -609,6 +612,7 @@ class TestSearchBase:
res = connect.search(collection, query)
assert abs(np.sqrt(res[0]._distances[0]) - min(distance_0, distance_1)) <= gen_inaccuracy(res[0]._distances[0])
@pytest.mark.tags(CaseLabel.L2)
def test_search_distance_l2_after_index(self, connect, id_collection, get_simple_index):
'''
target: search collection, and check the result: distance
@ -639,7 +643,7 @@ class TestSearchBase:
# TODO:
# assert abs(np.sqrt(res[0]._distances[0]) - min_distance) <= tmp_epsilon
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_distance_ip(self, connect, collection):
'''
target: search collection, and check the result: distance
@ -661,6 +665,7 @@ class TestSearchBase:
res = connect.search(collection, query)
assert abs(res[0]._distances[0] - max(distance_0, distance_1)) <= epsilon
@pytest.mark.tags(CaseLabel.L2)
def test_search_distance_ip_after_index(self, connect, id_collection, get_simple_index):
'''
target: search collection, and check the result: distance
@ -711,7 +716,7 @@ class TestSearchBase:
res = connect.search(binary_collection, query)
assert abs(res[0]._distances[0] - min(distance_0, distance_1)) <= epsilon
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_binary_flat_with_L2(self, connect, binary_collection):
'''
target: search binary_collection, and check the result: distance
@ -725,7 +730,7 @@ class TestSearchBase:
with pytest.raises(Exception) as e:
connect.search(binary_collection, query)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_distance_hamming_flat_index(self, connect, binary_collection):
'''
target: search binary_collection, and check the result: distance
@ -742,7 +747,7 @@ class TestSearchBase:
res = connect.search(binary_collection, query)
assert abs(res[0][0].distance - min(distance_0, distance_1).astype(float)) <= epsilon
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_distance_substructure_flat_index(self, connect, binary_collection):
'''
target: search binary_collection, and check the result: distance
@ -760,7 +765,7 @@ class TestSearchBase:
res = connect.search(binary_collection, query)
assert len(res[0]) == 0
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_distance_substructure_flat_index_B(self, connect, binary_collection):
'''
target: search binary_collection, and check the result: distance
@ -779,7 +784,7 @@ class TestSearchBase:
assert res[1][0].distance <= epsilon
assert res[1][0].id == ids[1]
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_distance_superstructure_flat_index(self, connect, binary_collection):
'''
target: search binary_collection, and check the result: distance
@ -797,7 +802,7 @@ class TestSearchBase:
res = connect.search(binary_collection, query)
assert len(res[0]) == 0
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_distance_superstructure_flat_index_B(self, connect, binary_collection):
'''
target: search binary_collection, and check the result: distance
@ -818,7 +823,7 @@ class TestSearchBase:
assert res[1][0].id in ids
assert res[1][0].distance <= epsilon
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_distance_tanimoto_flat_index(self, connect, binary_collection):
'''
target: search binary_collection, and check the result: distance
@ -835,7 +840,7 @@ class TestSearchBase:
res = connect.search(binary_collection, query)
assert abs(res[0][0].distance - min(distance_0, distance_1)) <= epsilon
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(300)
def test_search_concurrent_multithreads(self, connect, args):
'''
@ -870,7 +875,7 @@ class TestSearchBase:
for t in threads:
t.join()
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(300)
def test_search_concurrent_multithreads_single_connection(self, connect, args):
'''
@ -904,7 +909,7 @@ class TestSearchBase:
for t in threads:
t.join()
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_multi_collections(self, connect, args):
'''
target: test search multi collections of L2
@ -961,7 +966,7 @@ class TestSearchDSL(object):
# The following cases are used to build invalid query expr
******************************************************************
"""
@pytest.mark.tags(CaseLabel.L2)
def test_query_no_must(self, connect, collection):
'''
method: build query without must expr
@ -1037,8 +1042,7 @@ class TestSearchDSL(object):
# The following cases are used to build valid query expr
******************************************************************
"""
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_term_value_not_in(self, connect, collection):
'''
method: build query with vector and term expr, with no term can be filtered
@ -1054,7 +1058,7 @@ class TestSearchDSL(object):
assert len(res[0]) == 0
# TODO:
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_term_value_all_in(self, connect, collection):
'''
method: build query with vector and term expr, with all term can be filtered
@ -1069,7 +1073,7 @@ class TestSearchDSL(object):
assert len(res[0]) == 1
# TODO:
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_term_values_not_in(self, connect, collection):
'''
method: build query with vector and term expr, with no term can be filtered
@ -1085,6 +1089,7 @@ class TestSearchDSL(object):
assert len(res[0]) == 0
# TODO:
@pytest.mark.tags(CaseLabel.L2)
def test_query_term_values_all_in(self, connect, collection):
'''
method: build query with vector and term expr, with all term can be filtered
@ -1104,6 +1109,7 @@ class TestSearchDSL(object):
assert result.id in ids[:limit]
# TODO:
@pytest.mark.tags(CaseLabel.L2)
def test_query_term_values_parts_in(self, connect, collection):
'''
method: build query with vector and term expr, with parts of term can be filtered
@ -1120,7 +1126,7 @@ class TestSearchDSL(object):
assert len(res[0]) == default_top_k
# TODO:
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_term_values_repeat(self, connect, collection):
'''
method: build query with vector and term expr, with the same values
@ -1137,6 +1143,7 @@ class TestSearchDSL(object):
assert len(res[0]) == 1
# TODO:
@pytest.mark.tags(CaseLabel.L2)
def test_query_term_value_empty(self, connect, collection):
'''
method: build query with term value empty
@ -1172,7 +1179,7 @@ class TestSearchDSL(object):
******************************************************************
"""
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_term_key_error(self, connect, collection):
'''
method: build query with term key error
@ -1191,7 +1198,7 @@ class TestSearchDSL(object):
def get_invalid_term(self, request):
return request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_term_wrong_format(self, connect, collection, get_invalid_term):
'''
method: build query with wrong format term
@ -1204,7 +1211,7 @@ class TestSearchDSL(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_term_field_named_term(self, connect, collection):
'''
method: build query with field named "term"
@ -1231,7 +1238,7 @@ class TestSearchDSL(object):
assert len(res[0]) == default_top_k
connect.drop_collection(collection_term)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_term_one_field_not_existed(self, connect, collection):
'''
method: build query with two fields term, one of it not existed
@ -1270,7 +1277,7 @@ class TestSearchDSL(object):
def get_invalid_range(self, request):
return request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_range_wrong_format(self, connect, collection, get_invalid_range):
'''
method: build query with wrong format range
@ -1283,7 +1290,7 @@ class TestSearchDSL(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_range_string_ranges(self, connect, collection):
'''
method: build query with invalid ranges
@ -1297,7 +1304,7 @@ class TestSearchDSL(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_range_invalid_ranges(self, connect, collection):
'''
method: build query with invalid ranges
@ -1319,7 +1326,7 @@ class TestSearchDSL(object):
def get_valid_ranges(self, request):
return request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_range_valid_ranges(self, connect, collection, get_valid_ranges):
'''
method: build query with valid ranges
@ -1354,7 +1361,7 @@ class TestSearchDSL(object):
# The following cases are used to build query expr multi range and term
************************************************************************
"""
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_multi_term_has_common(self, connect, collection):
'''
method: build query with multi term with same field, and values has common
@ -1370,7 +1377,7 @@ class TestSearchDSL(object):
assert len(res) == nq
assert len(res[0]) == default_top_k
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_multi_term_no_common(self, connect, collection):
'''
method: build query with multi range with same field, and ranges no common
@ -1386,6 +1393,7 @@ class TestSearchDSL(object):
assert len(res) == nq
assert len(res[0]) == 0
@pytest.mark.tags(CaseLabel.L2)
def test_query_multi_term_different_fields(self, connect, collection):
'''
method: build query with multi range with same field, and ranges no common
@ -1402,7 +1410,7 @@ class TestSearchDSL(object):
assert len(res) == nq
assert len(res[0]) == 0
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_single_term_multi_fields(self, connect, collection):
'''
method: build query with multi term, different field each term
@ -1417,7 +1425,7 @@ class TestSearchDSL(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_multi_range_has_common(self, connect, collection):
'''
method: build query with multi range with same field, and ranges has common
@ -1433,7 +1441,7 @@ class TestSearchDSL(object):
assert len(res) == nq
assert len(res[0]) == default_top_k
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_multi_range_no_common(self, connect, collection):
'''
method: build query with multi range with same field, and ranges no common
@ -1449,7 +1457,7 @@ class TestSearchDSL(object):
assert len(res) == nq
assert len(res[0]) == 0
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_multi_range_different_fields(self, connect, collection):
'''
method: build query with multi range, different field each range
@ -1465,7 +1473,7 @@ class TestSearchDSL(object):
assert len(res) == nq
assert len(res[0]) == 0
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_single_range_multi_fields(self, connect, collection):
'''
method: build query with multi range, different field each range
@ -1485,7 +1493,7 @@ class TestSearchDSL(object):
# The following cases are used to build query expr both term and range
******************************************************************
"""
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_single_term_range_has_common(self, connect, collection):
'''
method: build query with single term single range
@ -1501,6 +1509,7 @@ class TestSearchDSL(object):
assert len(res) == nq
assert len(res[0]) == default_top_k
@pytest.mark.tags(CaseLabel.L2)
def test_query_single_term_range_no_common(self, connect, collection):
'''
method: build query with single term single range
@ -1521,7 +1530,7 @@ class TestSearchDSL(object):
# The following cases are used to build multi vectors query expr
******************************************************************
"""
@pytest.mark.tags(CaseLabel.L2)
def test_query_multi_vectors_same_field(self, connect, collection):
'''
method: build query with two vectors same field
@ -1545,7 +1554,7 @@ class TestSearchDSLBools(object):
******************************************************************
"""
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_query_no_bool(self, connect, collection):
'''
method: build query without bool expr
@ -1579,6 +1588,7 @@ class TestSearchDSLBools(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.L2)
def test_query_must_not_only_term(self, connect, collection):
'''
method: build query without must, with must_not.term instead
@ -1589,6 +1599,7 @@ class TestSearchDSLBools(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.L2)
def test_query_must_not_vector(self, connect, collection):
'''
method: build query without must, with must_not.vector instead
@ -1599,6 +1610,7 @@ class TestSearchDSLBools(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.L2)
def test_query_must_should(self, connect, collection):
'''
method: build query must, and with should.term
@ -1653,26 +1665,25 @@ class TestSearchInvalid(object):
# pytest.skip("sq8h not support in CPU mode")
return request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_with_invalid_collection(self, connect, get_collection_name):
collection_name = get_collection_name
with pytest.raises(Exception) as e:
res = connect.search(collection_name, default_query)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_with_invalid_partition(self, connect, collection, get_invalid_partition):
# tag = " "
tag = get_invalid_partition
with pytest.raises(Exception) as e:
res = connect.search(collection, default_query, partition_names=tag)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_with_invalid_field_name(self, connect, collection, get_invalid_field):
fields = [get_invalid_field]
with pytest.raises(Exception) as e:
res = connect.search(collection, default_query, fields=fields)
@pytest.mark.level(1)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_search_with_not_existed_field(self, connect, collection):
fields = [gen_unique_str("field_name")]
@ -1690,7 +1701,6 @@ class TestSearchInvalid(object):
def get_top_k(self, request):
yield request.param
@pytest.mark.level(1)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_search_with_invalid_top_k(self, connect, collection, get_top_k):
'''
@ -1715,7 +1725,7 @@ class TestSearchInvalid(object):
yield request.param
# 1463
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_with_invalid_params(self, connect, collection, get_simple_index, get_search_params):
'''
target: test search function, with the wrong nprobe
@ -1738,7 +1748,7 @@ class TestSearchInvalid(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_search_with_invalid_params_binary(self, connect, binary_collection):
'''
target: test search function, with the wrong nprobe
@ -1758,8 +1768,7 @@ class TestSearchInvalid(object):
res = connect.search(binary_collection, query)
# #1464
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.L2)
def test_search_with_empty_params(self, connect, collection, args, get_simple_index):
'''
target: test search function, with empty search params

View File

@ -20,6 +20,7 @@ class TestMysql:
logging.getLogger().info(reason)
pytest.skip(reason)
@pytest.mark.tags(CaseLabel.L2)
def _test_kill_mysql_during_index(self, connect, collection, args):
big_nb = 20000
index_param = {"nlist": 1024, "m": 16}

View File

@ -36,7 +36,7 @@ class TestRestartBase:
logging.getLogger().info(reason)
pytest.skip(reason)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def _test_insert_flush(self, connect, collection, args):
'''
target: return the same row count after server restart
@ -54,12 +54,12 @@ class TestRestartBase:
logging.getLogger().info("Start restart server")
assert restart_server(args["service_name"])
# assert row count again
new_connect = get_milvus(args["ip"], args["port"], handler=args["handler"])
new_connect = get_milvus(args["ip"], args["port"], handler=args["handler"])
res_count = new_connect.count_entities(collection)
logging.getLogger().info(res_count)
assert res_count == 2 * nb
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def _test_insert_during_flushing(self, connect, collection, args):
'''
target: flushing will recover
@ -75,7 +75,7 @@ class TestRestartBase:
# restart server
assert restart_server(args["service_name"])
# assert row count again
new_connect = get_milvus(args["ip"], args["port"], handler=args["handler"])
new_connect = get_milvus(args["ip"], args["port"], handler=args["handler"])
res_count_2 = new_connect.count_entities(collection)
logging.getLogger().info(res_count_2)
timeout = 300
@ -87,7 +87,7 @@ class TestRestartBase:
logging.getLogger().info(res_count_3)
assert res_count_3 == big_nb
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def _test_delete_during_flushing(self, connect, collection, args):
'''
target: flushing will recover
@ -120,7 +120,7 @@ class TestRestartBase:
logging.getLogger().info(res_count_3)
assert res_count_3 == big_nb - delete_length
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def _test_during_indexed(self, connect, collection, args):
'''
target: flushing will recover
@ -150,7 +150,7 @@ class TestRestartBase:
else:
assert True
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def _test_during_indexing(self, connect, collection, args):
'''
target: flushing will recover
@ -197,7 +197,7 @@ class TestRestartBase:
# else:
# assert True
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def _test_delete_flush_during_compacting(self, connect, collection, args):
'''
target: verify server work after restart during compaction
@ -237,7 +237,7 @@ class TestRestartBase:
assert size_before > size_after
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def _test_insert_during_flushing_multi_collections(self, connect, args):
'''
target: flushing will recover
@ -280,7 +280,7 @@ class TestRestartBase:
for name in collection_list:
assert new_connect.count_entities(name) == big_nb
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def _test_insert_during_flushing_multi_partitions(self, connect, collection, args):
'''
target: flushing will recover

View File

@ -77,7 +77,7 @@ from constants import *
# def get_threshold(self, request):
# yield request.param
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# @pytest.mark.timeout(COMPACT_TIMEOUT)
# def test_compact_collection_name_invalid(self, connect, get_collection_name):
# '''
@ -90,7 +90,7 @@ from constants import *
# status = connect.compact(collection_name)
# # assert not status.OK()
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# @pytest.mark.timeout(COMPACT_TIMEOUT)
# def test_compact_threshold_invalid(self, connect, collection, get_threshold):
# '''
@ -103,7 +103,7 @@ from constants import *
# with pytest.raises(Exception) as e:
# status = connect.compact(collection, threshold)
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# @pytest.mark.timeout(COMPACT_TIMEOUT)
# def test_add_entity_and_compact(self, connect, collection):
# '''
@ -203,7 +203,7 @@ from constants import *
# logging.getLogger().info(size_after)
# assert(size_before >= size_after)
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# @pytest.mark.timeout(COMPACT_TIMEOUT)
# def test_insert_delete_all_and_compact(self, connect, collection):
# '''
@ -227,7 +227,7 @@ from constants import *
# assert not info["partitions"][0]["segments"]
#
# # TODO: enable
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# @pytest.mark.timeout(COMPACT_TIMEOUT)
# def test_insert_partition_delete_half_and_compact(self, connect, collection):
# '''
@ -268,7 +268,7 @@ from constants import *
# pytest.skip("CPU not support index_type: ivf_sq8h")
# return request.param
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_compact_after_index_created(self, connect, collection, get_simple_index):
# '''
# target: test compact collection after index created
@ -529,7 +529,7 @@ from constants import *
# logging.getLogger().info(size_after)
# assert(size_before >= size_after)
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# @pytest.mark.timeout(COMPACT_TIMEOUT)
# def test_insert_delete_all_and_compact(self, connect, binary_collection):
# '''
@ -635,7 +635,7 @@ from constants import *
# status = connect.drop_collection(collection_list[i])
# assert status.OK()
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# @pytest.mark.timeout(COMPACT_TIMEOUT)
# def test_add_entity_after_compact(self, connect, binary_collection):
# '''
@ -677,7 +677,7 @@ from constants import *
# res = connect.count_entities(binary_collection)
# assert res == 0
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# @pytest.mark.timeout(COMPACT_TIMEOUT)
# def test_search_after_compact(self, connect, binary_collection):
# '''

View File

@ -68,7 +68,7 @@ CONFIG_TIMEOUT = 80
# config_value = connect.get_config("cache.cache_size")
# assert config_value
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_insert_buffer_size_invalid_parent_key(self, connect, collection):
# '''
# target: get invalid parent key
@ -80,7 +80,7 @@ CONFIG_TIMEOUT = 80
# with pytest.raises(Exception) as e:
# config_value = connect.get_config(config+".insert_buffer_size")
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_insert_buffer_size_invalid_child_key(self, connect, collection):
# '''
# target: get invalid child key
@ -102,7 +102,7 @@ CONFIG_TIMEOUT = 80
# config_value = connect.get_config("cache.insert_buffer_size")
# assert config_value
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_preload_collection_invalid_child_key(self, connect, collection):
# '''
# target: get invalid child key
@ -187,7 +187,7 @@ CONFIG_TIMEOUT = 80
# assert config_value == '2GB'
#
# @pytest.mark.skip(reason="overwrite config file is not supported in ci yet.")
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_set_cache_size_valid_multiple_times(self, connect, collection):
# '''
# target: set cache_size
@ -205,7 +205,7 @@ CONFIG_TIMEOUT = 80
# assert config_value == '2147483648'
#
# @pytest.mark.skip(reason="overwrite config file is not supported in ci yet.")
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_set_insert_buffer_size_invalid_parent_key(self, connect, collection):
# '''
# target: set invalid parent key
@ -230,7 +230,7 @@ CONFIG_TIMEOUT = 80
# relpy = connect.set_config("cache.insert_buffer_size", '2GB')
#
# @pytest.mark.skip(reason="overwrite config file is not supported in ci yet.")
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_set_insert_buffer_size_valid_multiple_times(self, connect, collection):
# '''
# target: set insert_buffer_size
@ -272,7 +272,7 @@ CONFIG_TIMEOUT = 80
# if args["handler"] == "HTTP":
# pytest.skip("skip in http mode")
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_gpu_search_threshold_invalid_parent_key(self, connect, collection):
# '''
# target: get invalid parent key
@ -286,7 +286,7 @@ CONFIG_TIMEOUT = 80
# with pytest.raises(Exception) as e:
# config_value = connect.get_config(config+".gpu_search_threshold")
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_gpu_search_threshold_invalid_child_key(self, connect, collection):
# '''
# target: get invalid child key
@ -436,7 +436,7 @@ CONFIG_TIMEOUT = 80
# config_value = connect.get_config("gpu.enable")
# assert config_value == "true" or config_value == "false"
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_cache_size_invalid_parent_key(self, connect, collection):
# '''
# target: get invalid parent key
@ -451,7 +451,7 @@ CONFIG_TIMEOUT = 80
# with pytest.raises(Exception) as e:
# config_value = connect.get_config(config+".cache_size")
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_cache_size_invalid_child_key(self, connect, collection):
# '''
# target: get invalid child key
@ -517,7 +517,7 @@ CONFIG_TIMEOUT = 80
# config_value = connect.get_config("gpu.search_devices")
# logging.getLogger().info(config_value)
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_build_index_devices_invalid_parent_key(self, connect, collection):
# '''
# target: get invalid parent key
@ -532,7 +532,7 @@ CONFIG_TIMEOUT = 80
# with pytest.raises(Exception) as e:
# config_value = connect.get_config(config+".build_index_devices")
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_build_index_devices_invalid_child_key(self, connect, collection):
# '''
# target: get invalid child key
@ -789,7 +789,7 @@ CONFIG_TIMEOUT = 80
# '''
# config_value = connect.get_config("network.bind.address")
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_port_invalid_child_key(self, connect, collection):
# '''
# target: get invalid child key
@ -811,7 +811,7 @@ CONFIG_TIMEOUT = 80
# config_value = connect.get_config("network.http.port")
# assert config_value
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_http_port_invalid_child_key(self, connect, collection):
# '''
# target: get invalid child key
@ -944,7 +944,7 @@ CONFIG_TIMEOUT = 80
# config_value = connect.get_config("general.meta_uri")
# assert config_value
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_timezone_invalid_child_key(self, connect, collection):
# '''
# target: get invalid child key
@ -1038,7 +1038,7 @@ CONFIG_TIMEOUT = 80
# config_value = connect.get_config("storage.path")
# assert config_value
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_auto_flush_interval_invalid_child_key(self, connect, collection):
# '''
# target: get invalid child key
@ -1165,7 +1165,7 @@ CONFIG_TIMEOUT = 80
# config_value = connect.get_config("metric.address")
# assert config_value
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_port_invalid_child_key(self, connect, collection):
# '''
# target: get invalid child key
@ -1300,7 +1300,7 @@ CONFIG_TIMEOUT = 80
# config_value = connect.get_config("wal.recovery_error_ignore")
# assert config_value
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_buffer_size_invalid_child_key(self, connect, collection):
# '''
# target: get invalid child key
@ -1322,7 +1322,7 @@ CONFIG_TIMEOUT = 80
# config_value = connect.get_config("wal.buffer_size")
# assert config_value
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_get_wal_path_invalid_child_key(self, connect, collection):
# '''
# target: get invalid child key

View File

@ -19,6 +19,7 @@ class TestConnect:
else:
return False
@pytest.mark.tags(CaseLabel.L2)
def test_close(self, connect):
'''
target: test disconnect
@ -29,6 +30,7 @@ class TestConnect:
with pytest.raises(Exception) as e:
connect.list_collections()
@pytest.mark.tags(CaseLabel.L2)
def test_close_repeatedly(self, dis_connect, args):
'''
target: test disconnect repeatedly
@ -38,6 +40,7 @@ class TestConnect:
with pytest.raises(Exception) as e:
dis_connect.close()
@pytest.mark.tags(CaseLabel.L2)
def test_connect_correct_ip_port(self, args):
'''
target: test connect with correct ip and port value
@ -47,6 +50,7 @@ class TestConnect:
milvus = get_milvus(args["ip"], args["port"], handler=args["handler"])
# TODO: Currently we test with remote IP, localhost testing need to add
@pytest.mark.tags(CaseLabel.L2)
def _test_connect_ip_localhost(self, args):
'''
target: test connect with ip value: localhost
@ -58,6 +62,7 @@ class TestConnect:
# assert milvus.connected()
@pytest.mark.timeout(CONNECT_TIMEOUT)
@pytest.mark.tags(CaseLabel.L2)
def test_connect_wrong_ip_null(self, args):
'''
target: test connect with wrong ip value
@ -68,6 +73,7 @@ class TestConnect:
with pytest.raises(Exception) as e:
get_milvus(ip, args["port"], args["handler"])
@pytest.mark.tags(CaseLabel.L2)
def test_connect_uri(self, args):
'''
target: test connect with correct uri
@ -77,6 +83,7 @@ class TestConnect:
uri_value = "tcp://%s:%s" % (args["ip"], args["port"])
milvus = get_milvus(args["ip"], args["port"], uri=uri_value, handler=args["handler"])
@pytest.mark.tags(CaseLabel.L2)
def test_connect_uri_null(self, args):
'''
target: test connect with null uri
@ -90,6 +97,7 @@ class TestConnect:
with pytest.raises(Exception) as e:
milvus = get_milvus(None, None, uri=uri_value, handler=args["handler"])
@pytest.mark.tags(CaseLabel.L2)
def test_connect_with_multiprocess(self, args):
'''
target: test uri connect with multiprocess
@ -106,6 +114,7 @@ class TestConnect:
for future in concurrent.futures.as_completed(future_results):
future.result()
@pytest.mark.tags(CaseLabel.L2)
def test_connect_repeatedly(self, args):
'''
target: test connect repeatedly
@ -116,6 +125,7 @@ class TestConnect:
milvus = Milvus(uri=uri_value, handler=args["handler"])
milvus = Milvus(uri=uri_value, handler=args["handler"])
@pytest.mark.tags(CaseLabel.L2)
def _test_add_vector_and_disconnect_concurrently(self):
'''
Target: test disconnect in the middle of add vectors
@ -129,6 +139,7 @@ class TestConnect:
'''
pass
@pytest.mark.tags(CaseLabel.L2)
def _test_search_vector_and_disconnect_concurrently(self):
'''
Target: Test disconnect in the middle of search vectors(with large nq and topk)multiple times, and search/add vectors still work
@ -141,6 +152,7 @@ class TestConnect:
'''
pass
@pytest.mark.tags(CaseLabel.L2)
def _test_thread_safe_with_one_connection_shared_in_multi_threads(self):
'''
Target: test 1 connection thread safe
@ -163,7 +175,7 @@ class TestConnectIPInvalid(object):
def get_invalid_ip(self, request):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(CONNECT_TIMEOUT)
def test_connect_with_invalid_ip(self, args, get_invalid_ip):
ip = get_invalid_ip
@ -183,7 +195,7 @@ class TestConnectPortInvalid(object):
def get_invalid_port(self, request):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(CONNECT_TIMEOUT)
def test_connect_with_invalid_port(self, args, get_invalid_port):
'''
@ -208,7 +220,7 @@ class TestConnectURIInvalid(object):
def get_invalid_uri(self, request):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(CONNECT_TIMEOUT)
def test_connect_with_invalid_uri(self, get_invalid_uri, args):
'''

View File

@ -83,6 +83,7 @@ class TestFlushBase:
# with pytest.raises(Exception) as e:
# connect.flush([collection])
@pytest.mark.tags(CaseLabel.L2)
def test_add_partition_flush(self, connect, id_collection):
'''
method: add entities into partition in collection, flush serveral times
@ -140,6 +141,7 @@ class TestFlushBase:
res = connect.get_collection_stats(collection_new)
assert res["row_count"] == default_nb
@pytest.mark.tags(CaseLabel.L2)
def test_add_collections_fields_flush(self, connect, id_collection, get_filter_field, get_vector_field):
'''
method: create collection with different fields, and add entities into collections, flush one
@ -187,6 +189,7 @@ class TestFlushBase:
assert len(res[0].ids) == 10
assert len(res[0].distances) == 10
@pytest.mark.tags(CaseLabel.L2)
def test_add_flush_auto(self, connect, id_collection):
'''
method: add entities
@ -252,7 +255,7 @@ class TestFlushBase:
# assert res
# TODO: unable to set config
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def _test_collection_count_during_flush(self, connect, collection, args):
'''
method: flush collection at background, call `get_collection_stats`
@ -281,7 +284,7 @@ class TestFlushBase:
res = connect.get_collection_stats(collection)
assert res["row_count"] == 0
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_delete_flush_during_search(self, connect, collection, args):
'''
method: search at background, call `delete and flush`
@ -321,6 +324,7 @@ class TestFlushAsync:
def check_status(self):
logging.getLogger().info("In callback check status")
@pytest.mark.tags(CaseLabel.L2)
def test_flush_empty_collection(self, connect, collection):
'''
method: flush collection with no vectors
@ -330,6 +334,7 @@ class TestFlushAsync:
status = future.result()
assert status is None
@pytest.mark.tags(CaseLabel.L2)
def test_flush_async_long(self, connect, collection):
ids = connect.insert(collection, default_entities)
assert len(ids) == default_nb
@ -372,7 +377,7 @@ class TestCollectionNameInvalid(object):
def get_invalid_collection_name(self, request):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_flush_with_invalid_collection_name(self, connect, get_invalid_collection_name):
collection_name = get_invalid_collection_name
if collection_name is None or not collection_name:

View File

@ -74,7 +74,7 @@ class TestIndexBase:
with pytest.raises(Exception) as e:
connect.create_index(collection, tmp_field_name, get_simple_index)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_create_index_on_field(self, connect, collection, get_simple_index):
'''
target: test create index interface
@ -86,6 +86,7 @@ class TestIndexBase:
with pytest.raises(Exception) as e:
connect.create_index(collection, tmp_field_name, get_simple_index)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_no_vectors(self, connect, collection, get_simple_index):
'''
@ -99,6 +100,7 @@ class TestIndexBase:
create_target_index(get_simple_index, field_name)
assert index == get_simple_index
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_partition(self, connect, collection, get_simple_index):
'''
@ -131,6 +133,7 @@ class TestIndexBase:
create_target_index(get_simple_index, field_name)
assert index == get_simple_index
@pytest.mark.tags(CaseLabel.L2)
def test_create_index_without_connect(self, dis_connect, collection):
'''
target: test create index without connection
@ -161,7 +164,7 @@ class TestIndexBase:
assert len(res) == nq
@pytest.mark.timeout(BUILD_TIMEOUT)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_create_index_multithread(self, connect, collection, args):
'''
target: test create index interface with multiprocess
@ -200,7 +203,7 @@ class TestIndexBase:
with pytest.raises(Exception) as e:
connect.create_index(collection_name, field_name, default_index)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_insert_flush(self, connect, collection, get_simple_index):
'''
@ -218,7 +221,7 @@ class TestIndexBase:
create_target_index(get_simple_index, field_name)
assert index == get_simple_index
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_same_index_repeatedly(self, connect, collection, get_simple_index):
'''
@ -233,7 +236,7 @@ class TestIndexBase:
create_target_index(get_simple_index, field_name)
assert index == get_simple_index
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_different_index_repeatedly(self, connect, collection):
'''
@ -252,7 +255,7 @@ class TestIndexBase:
# assert index == indexs[-1]
assert not index # FLAT is the last index_type, drop all indexes in server
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_different_index_repeatedly_B(self, connect, collection):
'''
@ -303,6 +306,7 @@ class TestIndexBase:
create_target_index(get_simple_index, field_name)
assert index == get_simple_index
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_partition_ip(self, connect, collection, get_simple_index):
'''
@ -360,7 +364,7 @@ class TestIndexBase:
assert len(res) == nq
@pytest.mark.timeout(BUILD_TIMEOUT)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_create_index_multithread_ip(self, connect, collection, args):
'''
target: test create index interface with multiprocess
@ -388,6 +392,7 @@ class TestIndexBase:
for t in threads:
t.join()
@pytest.mark.tags(CaseLabel.L2)
def test_create_index_collection_not_existed_ip(self, connect, collection):
'''
target: test create index interface when collection name not existed
@ -419,7 +424,7 @@ class TestIndexBase:
create_target_index(default_index, field_name)
assert index == default_index
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_same_index_repeatedly_ip(self, connect, collection):
'''
@ -435,7 +440,7 @@ class TestIndexBase:
create_target_index(default_index, field_name)
assert index == default_index
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_different_index_repeatedly_ip(self, connect, collection):
'''
@ -476,7 +481,7 @@ class TestIndexBase:
index = connect.describe_index(collection, "")
assert not index
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_drop_index_repeatedly(self, connect, collection, get_simple_index):
'''
target: test drop index repeatedly
@ -489,7 +494,7 @@ class TestIndexBase:
index = connect.describe_index(collection, "")
assert not index
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_drop_index_without_connect(self, dis_connect, collection):
'''
target: test drop index without connection
@ -521,7 +526,7 @@ class TestIndexBase:
# no create index
connect.drop_index(collection, field_name)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_create_drop_index_repeatedly(self, connect, collection, get_simple_index):
'''
target: test create / drop index repeatedly, use the same index params
@ -532,6 +537,7 @@ class TestIndexBase:
connect.create_index(collection, field_name, get_simple_index)
connect.drop_index(collection, field_name)
@pytest.mark.tags(CaseLabel.L2)
def test_drop_index_ip(self, connect, collection, get_simple_index):
'''
target: test drop index interface
@ -545,7 +551,7 @@ class TestIndexBase:
index = connect.describe_index(collection, "")
assert not index
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_drop_index_repeatedly_ip(self, connect, collection, get_simple_index):
'''
target: test drop index repeatedly
@ -559,7 +565,7 @@ class TestIndexBase:
index = connect.describe_index(collection, "")
assert not index
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_drop_index_without_connect_ip(self, dis_connect, collection):
'''
target: test drop index without connection
@ -569,6 +575,7 @@ class TestIndexBase:
with pytest.raises(Exception) as e:
dis_connect.drop_index(collection, field_name)
@pytest.mark.tags(CaseLabel.L2)
def test_drop_index_collection_not_create_ip(self, connect, collection):
'''
target: test drop index interface when index not created
@ -579,7 +586,7 @@ class TestIndexBase:
# no create index
connect.drop_index(collection, field_name)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_create_drop_index_repeatedly_ip(self, connect, collection, get_simple_index):
'''
target: test create / drop index repeatedly, use the same index params
@ -647,6 +654,7 @@ class TestIndexBinary:
The following cases are used to test `create_index` function
******************************************************************
"""
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index(self, connect, binary_collection, get_jaccard_index):
'''
@ -695,6 +703,7 @@ class TestIndexBinary:
assert len(res) == nq
@pytest.mark.timeout(BUILD_TIMEOUT)
@pytest.mark.tags(CaseLabel.L2)
def test_create_index_invalid_metric_type_binary(self, connect, binary_collection, get_l2_index):
'''
target: test create index interface with invalid metric type
@ -760,6 +769,7 @@ class TestIndexBinary:
The following cases are used to test `drop_index` function
******************************************************************
"""
@pytest.mark.tags(CaseLabel.L2)
def test_drop_index(self, connect, binary_collection, get_jaccard_index):
'''
target: test drop index interface
@ -802,13 +812,12 @@ class TestIndexInvalid(object):
yield request.param
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.level(1)
def test_create_index_with_invalid_collection_name(self, connect, get_collection_name):
collection_name = get_collection_name
with pytest.raises(Exception) as e:
connect.create_index(collection_name, field_name, default_index)
@pytest.mark.level(1)
@pytest.mark.tags(CaseLabel.L2)
def test_drop_index_with_invalid_collection_name(self, connect, get_collection_name):
collection_name = get_collection_name
with pytest.raises(Exception) as e:
@ -821,7 +830,7 @@ class TestIndexInvalid(object):
def get_index(self, request):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_create_index_with_invalid_index_params(self, connect, collection, get_index):
logging.getLogger().info(get_index)
with pytest.raises(Exception) as e:
@ -888,7 +897,7 @@ class TestIndexAsync:
logging.getLogger().info("DROP")
connect.drop_collection(collection)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_create_index_with_invalid_collection_name(self, connect):
collection_name = " "
with pytest.raises(Exception) as e:

View File

@ -23,6 +23,7 @@ default_index = {"index_type": "IVF_FLAT", "params": {"nlist": 16384}, "metric_t
class TestMixBase:
# TODO
@pytest.mark.tags(CaseLabel.L2)
def _test_mix_base(self, connect, collection):
nb = 200000
nq = 5
@ -43,6 +44,7 @@ class TestMixBase:
assert check_id_result(res[0], ids[0])
# disable
@pytest.mark.tags(CaseLabel.L2)
def _test_search_during_createIndex(self, args):
loops = 10000
collection = gen_unique_str()
@ -92,7 +94,7 @@ class TestMixBase:
p_create.start()
p_create.join()
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def _test_mix_multi_collections(self, connect):
'''
target: test functions with multiple collections of different metric_types and index_types

View File

@ -26,7 +26,7 @@ class TestCreateBase:
'''
connect.create_partition(collection, default_tag)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.timeout(600)
def test_create_partition_limit(self, connect, collection, args):
'''
@ -72,6 +72,7 @@ class TestCreateBase:
assert message == "create partition failed: partition name = %s already exists" % default_tag
assert compare_list_elements(connect.list_partitions(collection), [default_tag, '_default'])
@pytest.mark.tags(CaseLabel.L2)
def test_create_partition_collection_not_existed(self, connect):
'''
target: test create partition, its owner collection name not existed in db, check status returned
@ -172,7 +173,7 @@ class TestCreateBase:
res = connect.get_collection_stats(id_collection)
assert res["row_count"] == default_nb * 2
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_create_partition_insert_same_tags_two_collections(self, connect, collection):
'''
target: test create two partitions, and insert vectors with the same tag to each collection, check status returned
@ -301,7 +302,7 @@ class TestHasBase:
message = getattr(e, 'message', "The exception does not contain the field of message.")
assert message == "HasPartition failed: can't find collection: %s" % collection_name
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_has_partition_with_invalid_tag_name(self, connect, collection, get_tag_name):
'''
target: test has partition, with invalid tag name, check status returned
@ -369,8 +370,7 @@ class TestDropBase:
message = getattr(e, 'message', "The exception does not contain the field of message.")
assert message == "DropPartition failed: can't find collection: %s" % new_collection
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_drop_partition_repeatedly(self, connect, collection):
'''
target: test drop partition twice, check status and partition if existed
@ -421,7 +421,7 @@ class TestNameInvalid(object):
def get_collection_name(self, request):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_drop_partition_with_invalid_collection_name(self, connect, collection, get_collection_name):
'''
target: test drop partition, with invalid collection name, check status returned
@ -433,7 +433,7 @@ class TestNameInvalid(object):
with pytest.raises(Exception) as e:
connect.drop_partition(collection_name, default_tag)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_drop_partition_with_invalid_tag_name(self, connect, collection, get_tag_name):
'''
target: test drop partition, with invalid tag name, check status returned
@ -445,7 +445,7 @@ class TestNameInvalid(object):
with pytest.raises(Exception) as e:
connect.drop_partition(collection, tag_name)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.L2)
def test_list_partitions_with_invalid_collection_name(self, connect, collection, get_collection_name):
'''
target: test show partitions, with invalid collection name, check status returned

View File

@ -117,7 +117,7 @@ __version__ = '0.11.1'
# with pytest.raises(Exception) as e:
# res = dis_connect.server_status()
#
# @pytest.mark.level(2)
# @pytest.mark.tags(CaseLabel.L2)
# def test_server_version_with_timeout(self, dis_connect):
# '''
# target: test get the server status with timeout settings after disconnect

View File

@ -1025,4 +1025,7 @@ class MyThread(threading.Thread):
class CaseLabel:
tags_smoke = "smoke"
L1 = "L1"
L2 = "L2"
L3 = "L3"