Remove tags 0331 and l1

Signed-off-by: Cai Yudong <yudong.cai@zilliz.com>
pull/4973/head^2
Cai Yudong 2021-03-31 20:32:07 +08:00 committed by yefu.chen
parent 6796c7bfe7
commit 2f0ed72e89
16 changed files with 159 additions and 380 deletions

View File

@ -1,5 +1,5 @@
def isTimeTriggeredBuild = currentBuild.getBuildCauses('hudson.triggers.TimerTrigger$TimerTriggerCause').size() != 0
def regressionTimeout = isTimeTriggeredBuild ? "180" : "60"
def regressionTimeout = isTimeTriggeredBuild ? "120" : "60"
timeout(time: "${regressionTimeout}", unit: 'MINUTES') {
container('deploy-env') {
dir ('milvus-helm-chart') {
@ -50,7 +50,7 @@ timeout(time: "${regressionTimeout}", unit: 'MINUTES') {
sh "python3 -m pip install --no-cache-dir -r requirements.txt"
if (isTimeTriggeredBuild) {
echo "This is Cron Job!"
sh "pytest --tags=0331 -n 4 --ip ${env.HELM_RELEASE_NAME}-milvus-ha.${env.HELM_RELEASE_NAMESPACE}.svc.cluster.local"
sh "pytest -n 4 --ip ${env.HELM_RELEASE_NAME}-milvus-ha.${env.HELM_RELEASE_NAMESPACE}.svc.cluster.local"
} else {
sh "pytest --tags=smoke -n 4 --ip ${env.HELM_RELEASE_NAME}-milvus-ha.${env.HELM_RELEASE_NAMESPACE}.svc.cluster.local"
}

View File

@ -33,7 +33,7 @@ class TestCollectionCount:
def get_simple_index(self, request, connect):
return request.param
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_collection_count(self, connect, collection, insert_count):
'''
target: test collection rows_count is correct or not
@ -48,7 +48,7 @@ class TestCollectionCount:
stats = connect.get_collection_stats(collection)
assert stats[row_count] == insert_count
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_collection_count_partition(self, connect, collection, insert_count):
'''
target: test collection rows_count is correct or not
@ -138,7 +138,7 @@ class TestCollectionCount:
# stats = connect.get_collection_stats(collection)
# assert stats[row_count] == insert_count * 2
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_collection_count_after_index_created(self, connect, collection, get_simple_index, insert_count):
'''
target: test count_entities, after index have been created
@ -152,7 +152,6 @@ class TestCollectionCount:
stats = connect.get_collection_stats(collection)
assert stats[row_count] == insert_count
@pytest.mark.tags(CaseLabel.tags_0331)
def test_count_without_connection(self, collection, dis_connect):
'''
target: test count_entities, without connection
@ -162,7 +161,7 @@ class TestCollectionCount:
with pytest.raises(Exception) as e:
dis_connect.count_entities(collection)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_collection_count_no_vectors(self, connect, collection):
'''
target: test collection rows_count is correct or not, if collection is empty
@ -202,7 +201,6 @@ class TestCollectionCountIP:
request.param.update({"metric_type": "IP"})
return request.param
@pytest.mark.tags(CaseLabel.tags_0331)
def test_collection_count_after_index_created(self, connect, collection, get_simple_index, insert_count):
'''
target: test count_entities, after index have been created
@ -265,7 +263,7 @@ class TestCollectionCountBinary:
request.param["metric_type"] = "SUPERSTRUCTURE"
return request.param
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_collection_count(self, connect, binary_collection, insert_count):
'''
target: test collection rows_count is correct or not
@ -280,7 +278,7 @@ class TestCollectionCountBinary:
stats = connect.get_collection_stats(binary_collection)
assert stats[row_count] == insert_count
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_collection_count_partition(self, connect, binary_collection, insert_count):
'''
target: test collection rows_count is correct or not
@ -373,7 +371,7 @@ class TestCollectionCountBinary:
# assert stats[row_count] == insert_count * 2
# TODO: need to update and enable
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_collection_count_after_index_created(self, connect, binary_collection, get_jaccard_index, insert_count):
'''
target: test count_entities, after index have been created
@ -388,7 +386,6 @@ class TestCollectionCountBinary:
assert stats[row_count] == insert_count
# TODO: need to update and enable
@pytest.mark.tags(CaseLabel.tags_0331)
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
@ -403,7 +400,6 @@ class TestCollectionCountBinary:
stats = connect.get_collection_stats(binary_collection)
assert stats[row_count] == insert_count
@pytest.mark.tags(CaseLabel.tags_0331)
def test_collection_count_no_entities(self, connect, binary_collection):
'''
target: test collection rows_count is correct or not, if collection is empty
@ -431,7 +427,7 @@ class TestCollectionMultiCollections:
def insert_count(self, request):
yield request.param
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_collection_count_multi_collections_l2(self, connect, insert_count):
'''
target: test collection rows_count is correct or not with multiple collections of L2
@ -453,7 +449,6 @@ class TestCollectionMultiCollections:
assert stats[row_count] == insert_count
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
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
@ -476,7 +471,7 @@ class TestCollectionMultiCollections:
assert stats[row_count] == insert_count
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
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

@ -58,7 +58,7 @@ class TestGetCollectionStats:
def insert_count(self, request):
yield request.param
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_get_collection_stats_name_not_existed(self, connect, collection):
'''
target: get collection stats where collection name does not exist
@ -70,7 +70,6 @@ class TestGetCollectionStats:
connect.get_collection_stats(collection_name)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_get_collection_stats_name_invalid(self, connect, get_invalid_collection_name):
'''
target: get collection stats where collection name is invalid
@ -81,7 +80,7 @@ class TestGetCollectionStats:
with pytest.raises(Exception) as e:
connect.get_collection_stats(collection_name)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_get_collection_stats_empty(self, connect, collection):
'''
target: get collection stats where no entity in collection
@ -92,7 +91,6 @@ class TestGetCollectionStats:
connect.flush([collection])
assert stats[row_count] == 0
@pytest.mark.tags(CaseLabel.tags_0331)
def test_get_collection_stats_without_connection(self, collection, dis_connect):
'''
target: test count_entities, without connection
@ -102,7 +100,7 @@ class TestGetCollectionStats:
with pytest.raises(Exception) as e:
dis_connect.get_collection_stats(collection)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_get_collection_stats_batch(self, connect, collection):
'''
target: get row count with collection_stats
@ -115,7 +113,7 @@ class TestGetCollectionStats:
stats = connect.get_collection_stats(collection)
assert int(stats[row_count]) == default_nb
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_get_collection_stats_single(self, connect, collection):
'''
target: get row count with collection_stats
@ -190,7 +188,6 @@ class TestGetCollectionStats:
# pdb.set_trace()
assert compact_before == compact_after
@pytest.mark.tags(CaseLabel.tags_0331)
def test_get_collection_stats_partition(self, connect, collection):
'''
target: get partition info in a collection
@ -204,7 +201,7 @@ class TestGetCollectionStats:
stats = connect.get_collection_stats(collection)
assert stats[row_count] == default_nb
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_get_collection_stats_partitions(self, connect, collection):
'''
target: get partition info in a collection
@ -227,7 +224,6 @@ class TestGetCollectionStats:
stats = connect.get_collection_stats(collection)
assert stats[row_count] == default_nb * 3
@pytest.mark.tags(CaseLabel.tags_0331)
def test_get_collection_stats_partitions_A(self, connect, collection, insert_count):
'''
target: test collection rows_count is correct or not
@ -244,7 +240,6 @@ class TestGetCollectionStats:
stats = connect.get_collection_stats(collection)
assert stats[row_count] == insert_count
@pytest.mark.tags(CaseLabel.tags_0331)
def test_get_collection_stats_partitions_B(self, connect, collection, insert_count):
'''
target: test collection rows_count is correct or not
@ -261,7 +256,7 @@ class TestGetCollectionStats:
stats = connect.get_collection_stats(collection)
assert stats[row_count] == insert_count
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_get_collection_stats_partitions_C(self, connect, collection, insert_count):
'''
target: test collection rows_count is correct or not
@ -279,7 +274,6 @@ class TestGetCollectionStats:
stats = connect.get_collection_stats(collection)
assert stats[row_count] == insert_count*2
@pytest.mark.tags(CaseLabel.tags_0331)
def test_get_collection_stats_partitions_D(self, connect, collection, insert_count):
'''
target: test collection rows_count is correct or not
@ -298,7 +292,7 @@ class TestGetCollectionStats:
assert stats[row_count] == insert_count*2
# TODO: assert metric type in stats response
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_get_collection_stats_after_index_created(self, connect, collection, get_simple_index):
'''
target: test collection info after index created
@ -312,7 +306,6 @@ class TestGetCollectionStats:
assert stats[row_count] == default_nb
# TODO: assert metric type in stats response
@pytest.mark.tags(CaseLabel.tags_0331)
def test_get_collection_stats_after_index_created_ip(self, connect, collection, get_simple_index):
'''
target: test collection info after index created
@ -329,7 +322,6 @@ class TestGetCollectionStats:
assert stats[row_count] == default_nb
# TODO: assert metric type in stats response
@pytest.mark.tags(CaseLabel.tags_0331)
def test_get_collection_stats_after_index_created_jac(self, connect, binary_collection, get_jaccard_index):
'''
target: test collection info after index created
@ -342,7 +334,7 @@ class TestGetCollectionStats:
stats = connect.get_collection_stats(binary_collection)
assert stats[row_count] == default_nb
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_get_collection_stats_after_create_different_index(self, connect, collection):
'''
target: test collection info after index created repeatedly
@ -357,7 +349,7 @@ class TestGetCollectionStats:
stats = connect.get_collection_stats(collection)
assert stats[row_count] == default_nb
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_collection_count_multi_collections(self, connect):
'''
target: test collection rows_count is correct or not with multiple collections of L2
@ -379,7 +371,6 @@ class TestGetCollectionStats:
connect.drop_collection(collection_list[i])
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
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

@ -41,7 +41,7 @@ class TestCreateCollection:
def get_segment_row_limit(self, request):
yield request.param
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_collection_fields(self, connect, get_filter_field, get_vector_field):
'''
target: test create normal collection with different fields
@ -72,7 +72,7 @@ class TestCreateCollection:
connect.create_collection(collection_name, fields)
assert connect.has_collection(collection_name)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_collection_after_insert(self, connect, collection):
'''
target: test insert vector, then create collection again
@ -90,7 +90,7 @@ class TestCreateCollection:
message = getattr(e, 'message', "The exception does not contain the field of message.")
assert message == "Create collection failed: collection %s exist" % collection
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_collection_after_insert_flush(self, connect, collection):
'''
target: test insert vector, then create collection again
@ -108,7 +108,6 @@ class TestCreateCollection:
assert message == "Create collection failed: collection %s exist" % collection
# TODO: assert exception
@pytest.mark.tags(CaseLabel.tags_0331)
def test_create_collection_without_connection(self, dis_connect):
'''
target: test create collection, without connection
@ -119,7 +118,7 @@ class TestCreateCollection:
with pytest.raises(Exception) as e:
dis_connect.create_collection(collection_name, default_fields)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_collection_existed(self, connect):
'''
target: test create collection but the collection name have already existed
@ -136,7 +135,7 @@ class TestCreateCollection:
message = getattr(e, 'message', "The exception does not contain the field of message.")
assert message == "Create collection failed: collection %s exist" % collection_name
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_after_drop_collection(self, connect, collection):
'''
target: create with the same collection name after collection dropped
@ -148,7 +147,6 @@ class TestCreateCollection:
connect.create_collection(collection, default_fields)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_create_collection_multithread(self, connect):
'''
target: test create collection with multithread
@ -226,7 +224,6 @@ class TestCreateCollectionInvalid(object):
connect.create_collection(collection_name, fields)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_create_collection_with_invalid_dimension(self, connect, get_dim):
dimension = get_dim
collection_name = gen_unique_str()
@ -236,14 +233,13 @@ class TestCreateCollectionInvalid(object):
connect.create_collection(collection_name, fields)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
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.tags_0331)
@pytest.mark.parametrize("collection_name", ('', None))
def test_create_collection_with_empty_or_None_collection_name(self, connect, collection_name):
# collection_name = ''
@ -255,7 +251,6 @@ 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.tags_0331)
def test_create_collection_no_dimension(self, connect):
'''
target: test create collection with no dimension params
@ -288,7 +283,6 @@ class TestCreateCollectionInvalid(object):
assert res["segment_row_limit"] == default_server_segment_row_limit
# TODO: assert exception
@pytest.mark.tags(CaseLabel.tags_0331)
def test_create_collection_limit_fields(self, connect):
collection_name = gen_unique_str(uid)
limit_num = 64
@ -308,7 +302,6 @@ class TestCreateCollectionInvalid(object):
# TODO: assert exception
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_create_collection_invalid_field_name(self, connect, get_invalid_string):
collection_name = gen_unique_str(uid)
fields = copy.deepcopy(default_fields)
@ -319,7 +312,6 @@ class TestCreateCollectionInvalid(object):
connect.create_collection(collection_name, fields)
# TODO: assert exception
@pytest.mark.tags(CaseLabel.tags_0331)
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

@ -39,7 +39,7 @@ class TestDescribeCollection:
The following cases are used to test `describe_collection` function, no data in collection
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_collection_fields(self, connect, get_filter_field, get_vector_field):
'''
target: test create normal collection with different fields, check info returned
@ -65,7 +65,7 @@ class TestDescribeCollection:
assert field["name"] == vector_field["name"]
assert field["params"] == vector_field["params"]
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_describe_collection_after_index_created(self, connect, collection, get_simple_index):
connect.create_index(collection, default_float_vec_field_name, get_simple_index)
if get_simple_index["index_type"] != "FLAT":
@ -75,7 +75,6 @@ class TestDescribeCollection:
assert index["params"] == get_simple_index["params"]
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_describe_collection_without_connection(self, collection, dis_connect):
'''
target: test get collection info, without connection
@ -85,7 +84,7 @@ class TestDescribeCollection:
with pytest.raises(Exception) as e:
dis_connect.describe_collection(collection)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_describe_collection_not_existed(self, connect):
'''
target: test if collection not created
@ -106,7 +105,6 @@ class TestDescribeCollection:
assert message == "describe collection failed: can't find collection: %s" % collection_name
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_describe_collection_multithread(self, connect):
'''
target: test create collection with multithread
@ -134,7 +132,7 @@ class TestDescribeCollection:
The following cases are used to test `describe_collection` function, and insert data in collection
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_describe_collection_fields_after_insert(self, connect, get_filter_field, get_vector_field):
'''
target: test create normal collection with different fields, check info returned
@ -176,14 +174,12 @@ class TestDescribeCollectionInvalid(object):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
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.tags_0331)
@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

@ -17,7 +17,7 @@ class TestDropCollection:
The following cases are used to test `drop_collection` function
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_drop_collection_A(self, connect, collection):
'''
target: test delete collection created with correct params
@ -29,7 +29,6 @@ class TestDropCollection:
time.sleep(2)
assert not connect.has_collection(collection)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_drop_collection_without_connection(self, collection, dis_connect):
'''
target: test describe collection, without connection
@ -39,7 +38,7 @@ class TestDropCollection:
with pytest.raises(Exception) as e:
dis_connect.drop_collection(collection)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_drop_collection_not_existed(self, connect):
'''
target: test if collection not created
@ -57,7 +56,7 @@ class TestDropCollection:
assert message == "describe collection failed: can't find collection: %s" % collection_name
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_drop_collection_multithread(self, connect):
'''
target: test create and drop collection with multithread
@ -97,13 +96,11 @@ class TestDropCollectionInvalid(object):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
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.tags_0331)
@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

@ -17,7 +17,7 @@ class TestHasCollection:
The following cases are used to test `has_collection` function
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_has_collection(self, connect, collection):
'''
target: test if the created collection existed
@ -27,7 +27,6 @@ class TestHasCollection:
assert connect.has_collection(collection)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_has_collection_without_connection(self, collection, dis_connect):
'''
target: test has collection, without connection
@ -37,7 +36,7 @@ class TestHasCollection:
with pytest.raises(Exception) as e:
assert dis_connect.has_collection(collection)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_has_collection_not_existed(self, connect):
'''
target: test if collection not created
@ -52,7 +51,6 @@ class TestHasCollection:
assert not connect.has_collection(collection_name)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_has_collection_multithread(self, connect):
'''
target: test create collection with multithread
@ -88,21 +86,18 @@ class TestHasCollectionInvalid(object):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
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.tags_0331)
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.tags_0331)
def test_has_collection_with_none_collection_name(self, connect):
collection_name = None
with pytest.raises(Exception) as e:

View File

@ -12,7 +12,7 @@ class TestListCollections:
The following cases are used to test `list_collections` function
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_list_collections(self, connect, collection):
'''
target: test list collections
@ -21,7 +21,7 @@ class TestListCollections:
'''
assert collection in connect.list_collections()
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_list_collections_multi_collections(self, connect):
'''
target: test list collections
@ -35,7 +35,6 @@ class TestListCollections:
assert collection_name in connect.list_collections()
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_list_collections_without_connection(self, dis_connect):
'''
target: test list collections, without connection
@ -45,7 +44,6 @@ class TestListCollections:
with pytest.raises(Exception) as e:
dis_connect.list_collections()
@pytest.mark.tags(CaseLabel.tags_0331)
def test_list_collections_not_existed(self, connect):
'''
target: test if collection not created
@ -62,7 +60,6 @@ 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.tags_0331)
def test_list_collections_no_collection(self, connect):
'''
target: test show collections is correct or not, if no collection in db
@ -76,7 +73,6 @@ class TestListCollections:
assert connect.has_collection(collection_name)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_list_collections_multithread(self, connect):
'''
target: test list collection with multithread

View File

@ -36,7 +36,7 @@ class TestLoadCollection:
def get_binary_index(self, request, connect):
return request.param
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_load_collection_after_index(self, connect, collection, get_simple_index):
'''
target: test load collection, after index created
@ -49,7 +49,6 @@ class TestLoadCollection:
connect.load_collection(collection)
connect.release_collection(collection)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_load_collection_after_index_binary(self, connect, binary_collection, get_binary_index):
'''
@ -73,7 +72,7 @@ class TestLoadCollection:
connect.load_collection(binary_collection)
connect.release_collection(binary_collection)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_load_empty_collection(self, connect, collection):
'''
target: test load collection
@ -84,7 +83,6 @@ class TestLoadCollection:
connect.release_collection(collection)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_load_collection_dis_connect(self, dis_connect, collection):
'''
target: test load collection, without connection
@ -95,7 +93,6 @@ class TestLoadCollection:
dis_connect.load_collection(collection)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_release_collection_dis_connect(self, dis_connect, collection):
'''
target: test release collection, without connection
@ -106,7 +103,6 @@ class TestLoadCollection:
dis_connect.release_collection(collection)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_load_collection_not_existed(self, connect, collection):
collection_name = gen_unique_str(uid)
try:
@ -118,7 +114,6 @@ class TestLoadCollection:
assert message == "describe collection failed: can't find collection: %s" % collection_name
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_release_collection_not_existed(self, connect, collection):
collection_name = gen_unique_str(uid)
try:
@ -129,7 +124,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.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_release_collection_not_load(self, connect, collection):
"""
target: test release collection without load
@ -141,7 +136,7 @@ class TestLoadCollection:
connect.flush([collection])
connect.release_collection(collection)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_load_collection_after_load_release(self, connect, collection):
ids = connect.insert(collection, default_entities)
assert len(ids) == default_nb
@ -150,7 +145,6 @@ class TestLoadCollection:
connect.release_collection(collection)
connect.load_collection(collection)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_load_collection_repeatedly(self, connect, collection):
ids = connect.insert(collection, default_entities)
assert len(ids) == default_nb
@ -159,7 +153,6 @@ class TestLoadCollection:
connect.load_collection(collection)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_load_release_collection(self, connect, collection):
collection_name = gen_unique_str(uid)
connect.create_collection(collection_name, default_fields)
@ -184,7 +177,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.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_release_collection_after_drop(self, connect, collection):
"""
target: test release collection after drop
@ -204,7 +197,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
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_load_collection_without_flush(self, connect, collection):
"""
target: test load collection without flush
@ -223,7 +216,7 @@ class TestLoadCollection:
expected: raise exception
"""
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_load_collection_release_part_partitions(self, connect, collection):
"""
target: test release part partitions after load collection
@ -243,7 +236,6 @@ class TestLoadCollection:
res = connect.search(collection, default_single_query, partition_tags=[default_partition_name])
assert len(res[0]) == default_top_k
@pytest.mark.tags(CaseLabel.tags_0331)
def test_load_collection_release_all_partitions(self, connect, collection):
"""
target: test release all partitions after load collection
@ -261,7 +253,7 @@ class TestLoadCollection:
with pytest.raises(Exception) as e:
connect.search(collection, default_single_query)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_load_partitions_release_collection(self, connect, collection):
"""
target: test release collection after load partitions
@ -281,7 +273,7 @@ class TestLoadCollection:
class TestReleaseAdvanced:
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_release_collection_during_searching(self, connect, collection):
"""
target: test release collection during searching
@ -299,7 +291,6 @@ class TestReleaseAdvanced:
with pytest.raises(Exception):
connect.search(collection, default_single_query)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_release_partition_during_searching(self, connect, collection):
"""
target: test release partition during searching
@ -318,7 +309,7 @@ class TestReleaseAdvanced:
with pytest.raises(Exception):
res = connect.search(collection, default_single_query)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_release_collection_during_searching_A(self, connect, collection):
"""
target: test release collection during searching
@ -424,14 +415,12 @@ class TestLoadCollectionInvalid(object):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
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.tags_0331)
def test_release_collection_with_invalid_collection_name(self, connect, get_collection_name):
collection_name = get_collection_name
with pytest.raises(Exception) as e:
@ -466,7 +455,7 @@ class TestLoadPartition:
else:
pytest.skip("Skip index Temporary")
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_load_partition_after_index(self, connect, collection, get_simple_index):
'''
target: test load collection, after index created
@ -485,7 +474,7 @@ class TestLoadPartition:
assert len(res[0]) == default_top_k
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_load_partition_after_index_binary(self, connect, binary_collection, get_binary_index):
'''
target: test load binary_collection, after index created
@ -506,7 +495,7 @@ class TestLoadPartition:
connect.create_index(binary_collection, default_binary_vec_field_name, get_binary_index)
connect.load_partitions(binary_collection, [default_tag])
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_load_empty_partition(self, connect, collection):
'''
target: test load collection
@ -519,7 +508,6 @@ class TestLoadPartition:
assert len(res[0]) == 0
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_load_collection_dis_connect(self, connect, dis_connect, collection):
'''
target: test load collection, without connection
@ -531,7 +519,6 @@ class TestLoadPartition:
dis_connect.load_partitions(collection, [default_tag])
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_release_partition_dis_connect(self, connect, dis_connect, collection):
'''
target: test release collection, without connection
@ -544,7 +531,7 @@ class TestLoadPartition:
dis_connect.release_partitions(collection, [default_tag])
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_load_partition_not_existed(self, connect, collection):
partition_name = gen_unique_str(uid)
try:
@ -556,7 +543,7 @@ class TestLoadPartition:
assert message == "partitionID of partitionName:%s can not be find" % partition_name
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_release_partition_not_existed(self, connect, collection):
partition_name = gen_unique_str(uid)
try:
@ -567,7 +554,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.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_release_partition_not_load(self, connect, collection):
"""
target: test release collection without load
@ -581,7 +568,6 @@ class TestLoadPartition:
connect.release_partitions(collection, [default_tag])
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_load_release_after_drop(self, connect, collection):
connect.create_partition(collection, default_tag)
ids = connect.insert(collection, default_entities, partition_tag=default_tag)
@ -606,7 +592,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" % default_tag
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_release_partition_after_drop(self, connect, collection):
"""
target: test release collection after drop
@ -627,7 +613,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" % default_tag
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_load_release_after_collection_drop(self, connect, collection):
"""
target: test release collection after drop
@ -671,14 +657,12 @@ class TestLoadPartitionInvalid(object):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
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.tags_0331)
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

@ -49,7 +49,7 @@ class TestInsertBase:
def get_vector_field(self, request):
yield request.param
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_with_empty_entity(self, connect, collection):
'''
target: test insert with empty entity list
@ -60,7 +60,7 @@ class TestInsertBase:
with pytest.raises(ParamError) as e:
connect.insert(collection, entities)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_with_None(self, connect, collection):
'''
target: test insert with None
@ -72,7 +72,7 @@ class TestInsertBase:
connect.insert(collection, entity)
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_collection_not_existed(self, connect):
'''
target: test insert, with collection not existed
@ -84,7 +84,6 @@ class TestInsertBase:
connect.insert(collection_name, default_entities)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_without_connect(self, dis_connect, collection):
'''
target: test insert entities without connection
@ -95,7 +94,6 @@ class TestInsertBase:
dis_connect.insert(collection, default_entities)
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_drop_collection(self, connect, collection):
'''
target: test delete collection after insert entities
@ -108,7 +106,7 @@ class TestInsertBase:
assert connect.has_collection(collection) == False
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_flush_drop_collection(self, connect, collection):
'''
target: test drop collection after insert entities for a while
@ -122,7 +120,6 @@ class TestInsertBase:
assert connect.has_collection(collection) == False
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_create_index(self, connect, collection, get_simple_index):
'''
target: test build index insert after entities
@ -138,7 +135,7 @@ class TestInsertBase:
assert index == get_simple_index
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_after_create_index(self, connect, collection, get_simple_index):
'''
target: test build index insert after vector
@ -153,7 +150,7 @@ class TestInsertBase:
assert index == get_simple_index
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_search(self, connect, collection):
'''
target: test search entity after insert entity after a while
@ -187,7 +184,7 @@ class TestInsertBase:
yield request.param
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_ids(self, connect, id_collection, insert_count):
'''
target: test insert entities in collection, use customize ids
@ -204,7 +201,6 @@ class TestInsertBase:
assert stats[row_count] == nb
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_the_same_ids(self, connect, id_collection, insert_count):
'''
target: test insert vectors in collection, use customize the same ids
@ -221,7 +217,7 @@ class TestInsertBase:
assert stats[row_count] == nb
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_ids_fields(self, connect, get_filter_field, get_vector_field):
'''
target: test create normal collection with different fields, insert entities into id with ids
@ -247,7 +243,6 @@ class TestInsertBase:
assert stats[row_count] == nb
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_ids_not_match(self, connect, id_collection, insert_count):
'''
target: test insert entities in collection without ids
@ -260,7 +255,7 @@ class TestInsertBase:
# TODO
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_twice_ids_no_ids(self, connect, id_collection):
'''
target: check the result of insert, with params ids and no ids
@ -273,7 +268,6 @@ class TestInsertBase:
connect.insert(id_collection, default_entities)
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_not_ids(self, connect, id_collection):
'''
target: check the result of insert, with params ids and no ids
@ -284,7 +278,7 @@ class TestInsertBase:
connect.insert(id_collection, default_entities)
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_ids_length_not_match_batch(self, connect, id_collection):
'''
target: test insert vectors in collection, use customize ids, len(ids) != len(vectors)
@ -297,7 +291,6 @@ class TestInsertBase:
connect.insert(id_collection, default_entities, ids)
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_ids_length_not_match_single(self, connect, id_collection):
'''
target: test insert vectors in collection, use customize ids, len(ids) != len(vectors)
@ -310,7 +303,7 @@ class TestInsertBase:
connect.insert(id_collection, default_entity, ids)
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_partition(self, connect, collection):
'''
target: test insert entities in collection created before
@ -327,7 +320,7 @@ class TestInsertBase:
# TODO
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_partition_with_ids(self, connect, id_collection):
'''
target: test insert entities in collection created before, insert with ids
@ -341,7 +334,7 @@ class TestInsertBase:
logging.getLogger().info(connect.describe_collection(id_collection))
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_default_partition(self, connect, collection):
'''
target: test insert entities into default partition
@ -355,7 +348,6 @@ class TestInsertBase:
assert stats[row_count] == default_nb
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_partition_not_existed(self, connect, collection):
'''
target: test insert entities in collection created before
@ -367,7 +359,6 @@ class TestInsertBase:
connect.insert(collection, default_entities, partition_tag=tag)
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_partition_repeatedly(self, connect, collection):
'''
target: test insert entities in collection created before
@ -381,7 +372,7 @@ class TestInsertBase:
res = connect.get_collection_stats(collection)
assert res[row_count] == 2 * default_nb
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_dim_not_matched(self, connect, collection):
'''
target: test insert entities, the vector dimension is not equal to the collection dimension
@ -394,7 +385,7 @@ class TestInsertBase:
with pytest.raises(Exception) as e:
connect.insert(collection, insert_entities)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_with_field_name_not_match(self, connect, collection):
'''
target: test insert entities, with the entity field name updated
@ -406,7 +397,6 @@ class TestInsertBase:
connect.insert(collection, tmp_entity)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_with_field_type_not_match(self, connect, collection):
'''
target: test insert entities, with the entity field type updated
@ -418,7 +408,6 @@ class TestInsertBase:
connect.insert(collection, tmp_entity)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_with_field_value_not_match(self, connect, collection):
'''
target: test insert entities, with the entity field value updated
@ -429,7 +418,7 @@ class TestInsertBase:
with pytest.raises(Exception):
connect.insert(collection, tmp_entity)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_with_field_more(self, connect, collection):
'''
target: test insert entities, with more fields than collection schema
@ -440,7 +429,7 @@ class TestInsertBase:
with pytest.raises(Exception):
connect.insert(collection, tmp_entity)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_with_field_vector_more(self, connect, collection):
'''
target: test insert entities, with more fields than collection schema
@ -451,7 +440,7 @@ class TestInsertBase:
with pytest.raises(Exception):
connect.insert(collection, tmp_entity)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_with_field_less(self, connect, collection):
'''
target: test insert entities, with less fields than collection schema
@ -462,7 +451,7 @@ class TestInsertBase:
with pytest.raises(Exception):
connect.insert(collection, tmp_entity)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_with_field_vector_less(self, connect, collection):
'''
target: test insert entities, with less fields than collection schema
@ -473,7 +462,7 @@ class TestInsertBase:
with pytest.raises(Exception):
connect.insert(collection, tmp_entity)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_with_no_field_vector_value(self, connect, collection):
'''
target: test insert entities, with no vector field value
@ -485,7 +474,7 @@ class TestInsertBase:
with pytest.raises(Exception):
connect.insert(collection, tmp_entity)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_with_no_field_vector_type(self, connect, collection):
'''
target: test insert entities, with no vector field type
@ -497,7 +486,7 @@ class TestInsertBase:
with pytest.raises(Exception):
connect.insert(collection, tmp_entity)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_with_no_field_vector_name(self, connect, collection):
'''
target: test insert entities, with no vector field name
@ -512,7 +501,6 @@ class TestInsertBase:
# todo fix timeout
@pytest.mark.level(2)
@pytest.mark.timeout(30)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_collection_insert_rows_count_multi_threading(self, args, collection):
'''
target: test collection rows_count is correct or not with multi threading
@ -565,7 +553,7 @@ class TestInsertBinary:
request.param["metric_type"] = "JACCARD"
return request.param
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_binary_entities(self, connect, binary_collection):
'''
target: test insert entities in binary collection
@ -578,7 +566,7 @@ class TestInsertBinary:
stats = connect.get_collection_stats(binary_collection)
assert stats[row_count] == default_nb
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_binary_partition(self, connect, binary_collection):
'''
target: test insert entities and create partition tag
@ -593,7 +581,6 @@ class TestInsertBinary:
stats = connect.get_collection_stats(binary_collection)
assert stats[row_count] == default_nb
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_binary_multi_times(self, connect, binary_collection):
'''
target: test insert entities multi times and final flush
@ -607,7 +594,7 @@ class TestInsertBinary:
stats = connect.get_collection_stats(binary_collection)
assert stats[row_count] == default_nb
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_binary_after_create_index(self, connect, binary_collection, get_binary_index):
'''
target: test insert binary entities after build index
@ -622,7 +609,6 @@ class TestInsertBinary:
assert index == get_binary_index
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_binary_create_index(self, connect, binary_collection, get_binary_index):
'''
target: test build index insert after vector
@ -636,7 +622,7 @@ class TestInsertBinary:
index = connect.describe_index(binary_collection, binary_field_name)
assert index == get_binary_index
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_binary_search(self, connect, binary_collection):
'''
target: test search vector after insert vector after a while
@ -677,7 +663,7 @@ class TestInsertAsync:
logging.getLogger().info("In callback check results")
assert result
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_async(self, connect, collection, insert_count):
'''
target: test insert vectors with different length of vectors
@ -691,7 +677,6 @@ class TestInsertAsync:
assert len(ids) == nb
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_async_false(self, connect, collection, insert_count):
'''
target: test insert vectors with different length of vectors
@ -704,7 +689,7 @@ class TestInsertAsync:
connect.flush([collection])
assert len(ids) == nb
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_async_callback(self, connect, collection, insert_count):
'''
target: test insert vectors with different length of vectors
@ -718,7 +703,6 @@ class TestInsertAsync:
assert len(ids) == nb
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_async_long(self, connect, collection):
'''
target: test insert vectors with different length of vectors
@ -735,7 +719,6 @@ class TestInsertAsync:
assert stats[row_count] == nb
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_async_callback_timeout(self, connect, collection):
'''
target: test insert vectors with different length of vectors
@ -747,7 +730,7 @@ class TestInsertAsync:
with pytest.raises(Exception) as e:
result = future.result()
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_async_invalid_params(self, connect):
'''
target: test insert vectors with different length of vectors
@ -760,8 +743,7 @@ class TestInsertAsync:
with pytest.raises(Exception) as e:
ids = future.result()
# #1339
@pytest.mark.tags(CaseLabel.tags_0331)
# 1339
def test_insert_async_invalid_params_raise_exception(self, connect, collection):
'''
target: test insert vectors with different length of vectors
@ -793,7 +775,6 @@ class TestInsertMultiCollections:
# pytest.skip("sq8h not support in CPU mode")
return request.param
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_entity_multi_collections(self, connect):
'''
target: test insert entities
@ -813,7 +794,7 @@ class TestInsertMultiCollections:
assert stats[row_count] == default_nb
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_drop_collection_insert_entity_another(self, connect, collection):
'''
target: test insert vector to collection_1 after collection_2 deleted
@ -828,7 +809,7 @@ class TestInsertMultiCollections:
assert len(ids) == 1
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_index_insert_entity_another(self, connect, collection, get_simple_index):
'''
target: test insert vector to collection_2 after build index for collection_1
@ -846,7 +827,7 @@ class TestInsertMultiCollections:
connect.drop_collection(collection_name)
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_entity_create_index_another(self, connect, collection, get_simple_index):
'''
target: test insert vector to collection_2 after build index for collection_1
@ -865,7 +846,6 @@ class TestInsertMultiCollections:
assert stats[row_count] == 1
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331)
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
@ -881,7 +861,6 @@ class TestInsertMultiCollections:
assert stats[row_count] == 1
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_search_entity_insert_entity_another(self, connect, collection):
'''
target: test insert entity to collection_1 after search collection_2
@ -899,7 +878,7 @@ class TestInsertMultiCollections:
assert stats[row_count] == 1
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_insert_entity_search_entity_another(self, connect, collection):
'''
target: test insert entity to collection_1 after search collection_2
@ -916,7 +895,6 @@ class TestInsertMultiCollections:
assert stats[row_count] == 1
@pytest.mark.timeout(ADD_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_entity_sleep_search_entity_another(self, connect, collection):
'''
target: test insert entity to collection_1 after search collection_2 a while
@ -1006,7 +984,6 @@ class TestInsertInvalid(object):
def get_field_vectors_value(self, request):
yield request.param
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_ids_invalid(self, connect, id_collection, get_entity_id):
'''
target: test insert, with using customize ids, which are not int64
@ -1018,13 +995,11 @@ class TestInsertInvalid(object):
with pytest.raises(Exception):
connect.insert(id_collection, default_entities, ids)
@pytest.mark.tags(CaseLabel.tags_0331)
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.tags_0331)
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,27 +1009,23 @@ class TestInsertInvalid(object):
else:
connect.insert(collection, default_entity, partition_tag=tag_name)
@pytest.mark.tags(CaseLabel.tags_0331)
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.tags_0331)
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.tags_0331)
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.tags_0331)
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"]
@ -1118,21 +1089,18 @@ class TestInsertInvalidBinary(object):
yield request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
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.tags_0331)
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.tags_0331)
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"]
@ -1141,7 +1109,6 @@ class TestInsertInvalidBinary(object):
connect.insert(binary_collection, tmp_entity)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_insert_ids_invalid(self, connect, binary_id_collection, get_entity_id):
'''
target: test insert, with using customize ids, which are not int64
@ -1154,7 +1121,6 @@ class TestInsertInvalidBinary(object):
connect.insert(binary_id_collection, default_binary_entities, ids)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
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)
@ -1162,7 +1128,6 @@ class TestInsertInvalidBinary(object):
connect.insert(binary_collection, tmp_entity)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
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

@ -145,7 +145,7 @@ class TestSearchBase:
def get_nq(self, request):
yield request.param
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_search_flat(self, connect, collection, get_top_k, get_nq):
'''
target: test basic search function, all the search params is correct, change top-k value
@ -166,7 +166,6 @@ class TestSearchBase:
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.tags_0331)
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
@ -257,7 +256,6 @@ 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.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_after_index(self, connect, collection, get_simple_index, get_top_k, get_nq):
'''
@ -286,7 +284,6 @@ class TestSearchBase:
assert res[0]._distances[0] < epsilon
assert check_id_result(res[0], ids[0])
@pytest.mark.tags(CaseLabel.tags_0331)
def test_search_after_index_different_metric_type(self, connect, collection, get_simple_index):
'''
target: test search with different metric_type
@ -310,7 +307,6 @@ class TestSearchBase:
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_index_empty_partition(self, connect, collection, get_simple_index, get_top_k, get_nq):
'''
@ -344,7 +340,6 @@ class TestSearchBase:
res = connect.search(collection, query, partition_tags=[default_tag])
assert len(res[0]) == 0
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
@pytest.mark.timeout(600)
def test_search_index_partition(self, connect, collection, get_simple_index, get_top_k, get_nq):
@ -376,7 +371,6 @@ class TestSearchBase:
assert check_id_result(res[0], ids[0])
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_index_partition_not_existed(self, connect, collection, get_top_k, get_nq, get_simple_index):
'''
@ -397,7 +391,6 @@ class TestSearchBase:
with pytest.raises(Exception) as e:
connect.search(collection, query, partition_tags=["new_tag"])
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_index_partitions(self, connect, collection, get_simple_index, get_top_k):
'''
@ -433,7 +426,6 @@ class TestSearchBase:
assert res[1]._distances[0] > epsilon
connect.release_collection(collection)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_index_partitions_B(self, connect, collection, get_simple_index, get_top_k):
'''
@ -469,7 +461,6 @@ class TestSearchBase:
assert res[1]._distances[0] < epsilon
connect.release_collection(collection)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_ip_flat(self, connect, collection, get_simple_index, get_top_k, get_nq):
'''
@ -487,7 +478,6 @@ class TestSearchBase:
assert res[0]._distances[0] >= 1 - gen_inaccuracy(res[0]._distances[0])
assert check_id_result(res[0], ids[0])
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_ip_after_index(self, connect, collection, get_simple_index, get_top_k, get_nq):
'''
@ -513,7 +503,6 @@ class TestSearchBase:
assert check_id_result(res[0], ids[0])
assert res[0]._distances[0] >= 1 - gen_inaccuracy(res[0]._distances[0])
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_ip_index_empty_partition(self, connect, collection, get_simple_index, get_top_k, get_nq):
'''
@ -547,7 +536,6 @@ class TestSearchBase:
res = connect.search(collection, query, partition_tags=[default_tag])
assert len(res[0]) == 0
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_ip_index_partitions(self, connect, collection, get_simple_index, get_top_k):
'''
@ -581,7 +569,6 @@ class TestSearchBase:
# TODO:
# assert res[1]._distances[0] >= 1 - gen_inaccuracy(res[1]._distances[0])
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_without_connect(self, dis_connect, collection):
'''
@ -592,7 +579,6 @@ class TestSearchBase:
with pytest.raises(Exception) as e:
res = dis_connect.search(collection, default_query)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_search_collection_not_existed(self, connect):
'''
target: search collection not existed
@ -603,7 +589,7 @@ class TestSearchBase:
with pytest.raises(Exception) as e:
res = connect.search(collection_name, default_query)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_search_distance_l2(self, connect, collection):
'''
target: search collection, and check the result: distance
@ -623,7 +609,6 @@ 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.tags_0331)
def test_search_distance_l2_after_index(self, connect, id_collection, get_simple_index):
'''
target: search collection, and check the result: distance
@ -654,7 +639,6 @@ class TestSearchBase:
# TODO:
# assert abs(np.sqrt(res[0]._distances[0]) - min_distance) <= tmp_epsilon
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_distance_ip(self, connect, collection):
'''
@ -677,7 +661,6 @@ class TestSearchBase:
res = connect.search(collection, query)
assert abs(res[0]._distances[0] - max(distance_0, distance_1)) <= epsilon
@pytest.mark.tags(CaseLabel.tags_0331)
def test_search_distance_ip_after_index(self, connect, id_collection, get_simple_index):
'''
target: search collection, and check the result: distance
@ -711,7 +694,7 @@ class TestSearchBase:
# TODO:
# assert abs(res[0]._distances[0] - max_distance) <= tmp_epsilon
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_search_distance_jaccard_flat_index(self, connect, binary_collection):
'''
target: search binary_collection, and check the result: distance
@ -728,7 +711,6 @@ class TestSearchBase:
res = connect.search(binary_collection, query)
assert abs(res[0]._distances[0] - min(distance_0, distance_1)) <= epsilon
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_binary_flat_with_L2(self, connect, binary_collection):
'''
@ -743,7 +725,6 @@ class TestSearchBase:
with pytest.raises(Exception) as e:
connect.search(binary_collection, query)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_distance_hamming_flat_index(self, connect, binary_collection):
'''
@ -761,7 +742,6 @@ class TestSearchBase:
res = connect.search(binary_collection, query)
assert abs(res[0][0].distance - min(distance_0, distance_1).astype(float)) <= epsilon
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_distance_substructure_flat_index(self, connect, binary_collection):
'''
@ -780,7 +760,6 @@ class TestSearchBase:
res = connect.search(binary_collection, query)
assert len(res[0]) == 0
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_distance_substructure_flat_index_B(self, connect, binary_collection):
'''
@ -800,7 +779,6 @@ class TestSearchBase:
assert res[1][0].distance <= epsilon
assert res[1][0].id == ids[1]
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_distance_superstructure_flat_index(self, connect, binary_collection):
'''
@ -819,7 +797,6 @@ class TestSearchBase:
res = connect.search(binary_collection, query)
assert len(res[0]) == 0
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_distance_superstructure_flat_index_B(self, connect, binary_collection):
'''
@ -841,7 +818,6 @@ class TestSearchBase:
assert res[1][0].id in ids
assert res[1][0].distance <= epsilon
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_distance_tanimoto_flat_index(self, connect, binary_collection):
'''
@ -859,7 +835,6 @@ class TestSearchBase:
res = connect.search(binary_collection, query)
assert abs(res[0][0].distance - min(distance_0, distance_1)) <= epsilon
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
@pytest.mark.timeout(300)
def test_search_concurrent_multithreads(self, connect, args):
@ -895,7 +870,6 @@ class TestSearchBase:
for t in threads:
t.join()
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
@pytest.mark.timeout(300)
def test_search_concurrent_multithreads_single_connection(self, connect, args):
@ -930,7 +904,6 @@ class TestSearchBase:
for t in threads:
t.join()
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_search_multi_collections(self, connect, args):
'''
@ -984,8 +957,6 @@ class TestSearchDSL(object):
# The following cases are used to build invalid query expr
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331)
def test_query_no_must(self, connect, collection):
'''
method: build query without must expr
@ -996,7 +967,7 @@ class TestSearchDSL(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_query_no_vector_term_only(self, connect, collection):
'''
method: build query without vector only term
@ -1010,7 +981,7 @@ class TestSearchDSL(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_query_no_vector_range_only(self, connect, collection):
'''
method: build query without vector only range
@ -1024,7 +995,7 @@ class TestSearchDSL(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_query_vector_only(self, connect, collection):
entities, ids = init_data(connect, collection)
connect.load_collection(collection)
@ -1032,7 +1003,7 @@ class TestSearchDSL(object):
assert len(res) == nq
assert len(res[0]) == default_top_k
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_query_wrong_format(self, connect, collection):
'''
method: build query without must expr, with wrong expr name
@ -1046,7 +1017,7 @@ class TestSearchDSL(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_query_empty(self, connect, collection):
'''
method: search with empty query
@ -1062,7 +1033,6 @@ class TestSearchDSL(object):
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_term_value_not_in(self, connect, collection):
'''
@ -1079,7 +1049,6 @@ class TestSearchDSL(object):
assert len(res[0]) == 0
# TODO:
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_term_value_all_in(self, connect, collection):
'''
@ -1095,7 +1064,6 @@ class TestSearchDSL(object):
assert len(res[0]) == 1
# TODO:
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_term_values_not_in(self, connect, collection):
'''
@ -1112,7 +1080,6 @@ class TestSearchDSL(object):
assert len(res[0]) == 0
# TODO:
@pytest.mark.tags(CaseLabel.tags_0331)
def test_query_term_values_all_in(self, connect, collection):
'''
method: build query with vector and term expr, with all term can be filtered
@ -1132,7 +1099,6 @@ class TestSearchDSL(object):
assert result.id in ids[:limit]
# TODO:
@pytest.mark.tags(CaseLabel.tags_0331)
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
@ -1149,7 +1115,6 @@ class TestSearchDSL(object):
assert len(res[0]) == default_top_k
# TODO:
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_term_values_repeat(self, connect, collection):
'''
@ -1167,7 +1132,6 @@ class TestSearchDSL(object):
assert len(res[0]) == 1
# TODO:
@pytest.mark.tags(CaseLabel.tags_0331)
def test_query_term_value_empty(self, connect, collection):
'''
method: build query with term value empty
@ -1180,7 +1144,7 @@ class TestSearchDSL(object):
assert len(res) == nq
assert len(res[0]) == 0
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_query_complex_dsl(self, connect, collection):
'''
method: query with complicated dsl
@ -1202,8 +1166,6 @@ class TestSearchDSL(object):
# The following cases are used to build invalid term query expr
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_term_key_error(self, connect, collection):
'''
@ -1223,7 +1185,6 @@ class TestSearchDSL(object):
def get_invalid_term(self, request):
return request.param
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_term_wrong_format(self, connect, collection, get_invalid_term):
'''
@ -1237,7 +1198,6 @@ class TestSearchDSL(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_term_field_named_term(self, connect, collection):
'''
@ -1265,7 +1225,6 @@ class TestSearchDSL(object):
assert len(res[0]) == default_top_k
connect.drop_collection(collection_term)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_term_one_field_not_existed(self, connect, collection):
'''
@ -1285,8 +1244,7 @@ class TestSearchDSL(object):
# The following cases are used to build valid range query expr
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_query_range_key_error(self, connect, collection):
'''
method: build query with range key error
@ -1305,7 +1263,6 @@ class TestSearchDSL(object):
def get_invalid_range(self, request):
return request.param
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_range_wrong_format(self, connect, collection, get_invalid_range):
'''
@ -1319,7 +1276,6 @@ class TestSearchDSL(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_range_string_ranges(self, connect, collection):
'''
@ -1334,7 +1290,6 @@ class TestSearchDSL(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_range_invalid_ranges(self, connect, collection):
'''
@ -1357,7 +1312,6 @@ class TestSearchDSL(object):
def get_valid_ranges(self, request):
return request.param
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_range_valid_ranges(self, connect, collection, get_valid_ranges):
'''
@ -1374,7 +1328,7 @@ class TestSearchDSL(object):
assert len(res) == nq
assert len(res[0]) == default_top_k
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_query_range_one_field_not_existed(self, connect, collection):
'''
method: build query with two fields ranges, one of fields not existed
@ -1393,8 +1347,6 @@ class TestSearchDSL(object):
# The following cases are used to build query expr multi range and term
************************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_multi_term_has_common(self, connect, collection):
'''
@ -1411,7 +1363,6 @@ class TestSearchDSL(object):
assert len(res) == nq
assert len(res[0]) == default_top_k
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_multi_term_no_common(self, connect, collection):
'''
@ -1428,7 +1379,6 @@ class TestSearchDSL(object):
assert len(res) == nq
assert len(res[0]) == 0
@pytest.mark.tags(CaseLabel.tags_0331)
def test_query_multi_term_different_fields(self, connect, collection):
'''
method: build query with multi range with same field, and ranges no common
@ -1445,7 +1395,6 @@ class TestSearchDSL(object):
assert len(res) == nq
assert len(res[0]) == 0
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_single_term_multi_fields(self, connect, collection):
'''
@ -1461,7 +1410,6 @@ class TestSearchDSL(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_multi_range_has_common(self, connect, collection):
'''
@ -1478,7 +1426,6 @@ class TestSearchDSL(object):
assert len(res) == nq
assert len(res[0]) == default_top_k
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_multi_range_no_common(self, connect, collection):
'''
@ -1495,7 +1442,6 @@ class TestSearchDSL(object):
assert len(res) == nq
assert len(res[0]) == 0
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_multi_range_different_fields(self, connect, collection):
'''
@ -1512,7 +1458,6 @@ class TestSearchDSL(object):
assert len(res) == nq
assert len(res[0]) == 0
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_single_range_multi_fields(self, connect, collection):
'''
@ -1533,8 +1478,6 @@ class TestSearchDSL(object):
# The following cases are used to build query expr both term and range
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_single_term_range_has_common(self, connect, collection):
'''
@ -1551,7 +1494,6 @@ class TestSearchDSL(object):
assert len(res) == nq
assert len(res[0]) == default_top_k
@pytest.mark.tags(CaseLabel.tags_0331)
def test_query_single_term_range_no_common(self, connect, collection):
'''
method: build query with single term single range
@ -1572,8 +1514,6 @@ class TestSearchDSL(object):
# The following cases are used to build multi vectors query expr
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331)
def test_query_multi_vectors_same_field(self, connect, collection):
'''
method: build query with two vectors same field
@ -1596,8 +1536,6 @@ class TestSearchDSLBools(object):
# The following cases are used to build invalid query expr
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_query_no_bool(self, connect, collection):
'''
@ -1610,7 +1548,7 @@ class TestSearchDSLBools(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_query_should_only_term(self, connect, collection):
'''
method: build query without must, with should.term instead
@ -1621,7 +1559,7 @@ class TestSearchDSLBools(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_query_should_only_vector(self, connect, collection):
'''
method: build query without must, with should.vector instead
@ -1632,7 +1570,6 @@ class TestSearchDSLBools(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_query_must_not_only_term(self, connect, collection):
'''
method: build query without must, with must_not.term instead
@ -1643,7 +1580,6 @@ class TestSearchDSLBools(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_query_must_not_vector(self, connect, collection):
'''
method: build query without must, with must_not.vector instead
@ -1654,7 +1590,6 @@ class TestSearchDSLBools(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_query_must_should(self, connect, collection):
'''
method: build query must, and with should.term
@ -1710,14 +1645,12 @@ class TestSearchInvalid(object):
return request.param
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
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.tags_0331)
def test_search_with_invalid_partition(self, connect, collection, get_invalid_partition):
# tag = " "
tag = get_invalid_partition
@ -1725,14 +1658,13 @@ class TestSearchInvalid(object):
res = connect.search(collection, default_query, partition_tags=tag)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
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_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_search_with_not_existed_field(self, connect, collection):
fields = [gen_unique_str("field_name")]
with pytest.raises(Exception) as e:
@ -1750,7 +1682,7 @@ class TestSearchInvalid(object):
yield request.param
@pytest.mark.level(1)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_search_with_invalid_top_k(self, connect, collection, get_top_k):
'''
target: test search function, with the wrong top_k
@ -1773,9 +1705,8 @@ class TestSearchInvalid(object):
def get_search_params(self, request):
yield request.param
# #1463
# 1463
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_search_with_invalid_params(self, connect, collection, get_simple_index, get_search_params):
'''
target: test search function, with the wrong nprobe
@ -1799,7 +1730,6 @@ class TestSearchInvalid(object):
res = connect.search(collection, query)
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_search_with_invalid_params_binary(self, connect, binary_collection):
'''
target: test search function, with the wrong nprobe
@ -1820,7 +1750,7 @@ class TestSearchInvalid(object):
# #1464
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_search_with_empty_params(self, connect, collection, args, get_simple_index):
'''
target: test search function, with empty search params
@ -1840,7 +1770,7 @@ class TestSearchInvalid(object):
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_search_with_empty_vectors(self, connect, collection):
"""
target: test search function, with empty search vectors

View File

@ -19,7 +19,6 @@ class TestConnect:
else:
return False
@pytest.mark.tags(CaseLabel.tags_0331)
def test_close(self, connect):
'''
target: test disconnect
@ -30,7 +29,6 @@ class TestConnect:
with pytest.raises(Exception) as e:
connect.list_collections()
@pytest.mark.tags(CaseLabel.tags_0331)
def test_close_repeatedly(self, dis_connect, args):
'''
target: test disconnect repeatedly
@ -40,7 +38,6 @@ class TestConnect:
with pytest.raises(Exception) as e:
dis_connect.close()
@pytest.mark.tags(CaseLabel.tags_0331)
def test_connect_correct_ip_port(self, args):
'''
target: test connect with correct ip and port value
@ -61,7 +58,6 @@ class TestConnect:
# assert milvus.connected()
@pytest.mark.timeout(CONNECT_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_connect_wrong_ip_null(self, args):
'''
target: test connect with wrong ip value
@ -72,7 +68,6 @@ class TestConnect:
with pytest.raises(Exception) as e:
get_milvus(ip, args["port"], args["handler"])
@pytest.mark.tags(CaseLabel.tags_0331)
def test_connect_uri(self, args):
'''
target: test connect with correct uri
@ -82,7 +77,6 @@ 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.tags_0331)
def test_connect_uri_null(self, args):
'''
target: test connect with null uri
@ -96,7 +90,6 @@ class TestConnect:
with pytest.raises(Exception) as e:
milvus = get_milvus(None, None, uri=uri_value, handler=args["handler"])
@pytest.mark.tags(CaseLabel.tags_0331)
def test_connect_with_multiprocess(self, args):
'''
target: test uri connect with multiprocess
@ -113,7 +106,6 @@ class TestConnect:
for future in concurrent.futures.as_completed(future_results):
future.result()
@pytest.mark.tags(CaseLabel.tags_0331)
def test_connect_repeatedly(self, args):
'''
target: test connect repeatedly
@ -173,7 +165,6 @@ class TestConnectIPInvalid(object):
@pytest.mark.level(2)
@pytest.mark.timeout(CONNECT_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_connect_with_invalid_ip(self, args, get_invalid_ip):
ip = get_invalid_ip
with pytest.raises(Exception) as e:
@ -194,7 +185,6 @@ class TestConnectPortInvalid(object):
@pytest.mark.level(2)
@pytest.mark.timeout(CONNECT_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_connect_with_invalid_port(self, args, get_invalid_port):
'''
target: test ip:port connect with invalid port value
@ -220,7 +210,6 @@ class TestConnectURIInvalid(object):
@pytest.mark.level(2)
@pytest.mark.timeout(CONNECT_TIMEOUT)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_connect_with_invalid_uri(self, get_invalid_uri, args):
'''
target: test uri connect with invalid uri value

View File

@ -49,7 +49,7 @@ class TestFlushBase:
def get_vector_field(self, request):
yield request.param
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_flush_collection_not_existed(self, connect, collection):
'''
target: test flush, params collection_name not existed
@ -65,7 +65,7 @@ class TestFlushBase:
message = getattr(e, 'message', "The exception does not contain the field of message.")
assert message == "describe collection failed: can't find collection: %s" % collection_new
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_flush_empty_collection(self, connect, collection):
'''
method: flush collection with no vectors
@ -83,7 +83,6 @@ class TestFlushBase:
# with pytest.raises(Exception) as e:
# connect.flush([collection])
@pytest.mark.tags(CaseLabel.tags_0331)
def test_add_partition_flush(self, connect, id_collection):
'''
method: add entities into partition in collection, flush serveral times
@ -101,7 +100,7 @@ class TestFlushBase:
res_count = connect.get_collection_stats(id_collection)
assert res_count["row_count"] == default_nb * 2
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_add_partitions_flush(self, connect, id_collection):
'''
method: add entities into partitions in collection, flush one
@ -118,7 +117,7 @@ class TestFlushBase:
res = connect.get_collection_stats(id_collection)
assert res["row_count"] == 2 * default_nb
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_add_collections_flush(self, connect, id_collection):
'''
method: add entities into collections, flush one
@ -141,7 +140,6 @@ class TestFlushBase:
res = connect.get_collection_stats(collection_new)
assert res["row_count"] == default_nb
@pytest.mark.tags(CaseLabel.tags_0331)
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
@ -174,7 +172,7 @@ class TestFlushBase:
assert res["row_count"] == nb_new
# TODO ci failed
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_add_flush_multiable_times(self, connect, collection):
'''
method: add entities, flush serveral times
@ -193,7 +191,6 @@ class TestFlushBase:
assert len(res[0].ids) == 10
assert len(res[0].distances) == 10
@pytest.mark.tags(CaseLabel.tags_0331)
def test_add_flush_auto(self, connect, id_collection):
'''
method: add entities
@ -223,7 +220,7 @@ class TestFlushBase:
def same_ids(self, request):
yield request.param
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_add_flush_same_ids(self, connect, id_collection, same_ids):
'''
method: add entities, with same ids, count(same ids) < 15, > 15
@ -238,7 +235,7 @@ class TestFlushBase:
res = connect.get_collection_stats(id_collection)
assert res["row_count"] == default_nb
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_delete_flush_multiable_times(self, connect, collection):
'''
method: delete entities, flush serveral times
@ -288,7 +285,6 @@ class TestFlushBase:
res = connect.get_collection_stats(collection)
assert res["row_count"] == 0
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_delete_flush_during_search(self, connect, collection, args):
'''
@ -329,7 +325,6 @@ class TestFlushAsync:
def check_status(self):
logging.getLogger().info("In callback check status")
@pytest.mark.tags(CaseLabel.tags_0331)
def test_flush_empty_collection(self, connect, collection):
'''
method: flush collection with no vectors
@ -339,7 +334,6 @@ class TestFlushAsync:
status = future.result()
assert status is None
@pytest.mark.tags(CaseLabel.tags_0331)
def test_flush_async_long(self, connect, collection):
ids = connect.insert(collection, default_entities)
assert len(ids) == default_nb
@ -347,7 +341,7 @@ class TestFlushAsync:
status = future.result()
assert status is None
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_flush_async_long_drop_collection(self, connect, collection):
for i in range(5):
ids = connect.insert(collection, default_entities)
@ -358,7 +352,7 @@ class TestFlushAsync:
res = connect.drop_collection(collection)
assert res is None
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_flush_async(self, connect, collection):
connect.insert(collection, default_entities)
logging.getLogger().info("before")
@ -382,7 +376,6 @@ class TestCollectionNameInvalid(object):
def get_invalid_collection_name(self, request):
yield request.param
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_flush_with_invalid_collection_name(self, connect, get_invalid_collection_name):
collection_name = get_invalid_collection_name
@ -391,7 +384,7 @@ class TestCollectionNameInvalid(object):
with pytest.raises(Exception) as e:
connect.flush(collection_name)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_flush_empty(self, connect, collection):
ids = connect.insert(collection, default_entities)
assert len(ids) == default_nb

View File

@ -47,7 +47,7 @@ class TestIndexBase:
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index(self, connect, collection, get_simple_index):
'''
@ -61,7 +61,7 @@ class TestIndexBase:
index = connect.describe_index(collection, field_name)
assert index == get_simple_index
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_index_on_field_not_existed(self, connect, collection, get_simple_index):
'''
target: test create index interface
@ -73,7 +73,6 @@ class TestIndexBase:
with pytest.raises(Exception) as e:
connect.create_index(collection, tmp_field_name, get_simple_index)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_create_index_on_field(self, connect, collection, get_simple_index):
'''
@ -86,7 +85,6 @@ class TestIndexBase:
with pytest.raises(Exception) as e:
connect.create_index(collection, tmp_field_name, get_simple_index)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_no_vectors(self, connect, collection, get_simple_index):
'''
@ -99,7 +97,6 @@ class TestIndexBase:
index = connect.describe_index(collection, field_name)
assert index == get_simple_index
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_partition(self, connect, collection, get_simple_index):
'''
@ -114,7 +111,7 @@ class TestIndexBase:
index = connect.describe_index(collection, field_name)
assert index == get_simple_index
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_partition_flush(self, connect, collection, get_simple_index):
'''
@ -130,7 +127,6 @@ class TestIndexBase:
index = connect.describe_index(collection, field_name)
assert index == get_simple_index
@pytest.mark.tags(CaseLabel.tags_0331)
def test_create_index_without_connect(self, dis_connect, collection):
'''
target: test create index without connection
@ -140,7 +136,7 @@ class TestIndexBase:
with pytest.raises(Exception) as e:
dis_connect.create_index(collection, field_name, get_simple_index)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_search_with_query_vectors(self, connect, collection, get_simple_index, get_nq):
'''
@ -160,7 +156,6 @@ class TestIndexBase:
res = connect.search(collection, query)
assert len(res) == nq
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.timeout(BUILD_TIMEOUT)
@pytest.mark.level(2)
def test_create_index_multithread(self, connect, collection, args):
@ -188,7 +183,7 @@ class TestIndexBase:
for t in threads:
t.join()
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_index_collection_not_existed(self, connect):
'''
target: test create index interface when collection name not existed
@ -200,7 +195,6 @@ class TestIndexBase:
with pytest.raises(Exception) as e:
connect.create_index(collection_name, field_name, default_index)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_insert_flush(self, connect, collection, get_simple_index):
@ -218,7 +212,6 @@ class TestIndexBase:
index = connect.describe_index(collection, field_name)
assert index == get_simple_index
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_same_index_repeatedly(self, connect, collection, get_simple_index):
@ -233,7 +226,6 @@ class TestIndexBase:
index = connect.describe_index(collection, field_name)
assert index == get_simple_index
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_different_index_repeatedly(self, connect, collection):
@ -253,7 +245,6 @@ class TestIndexBase:
# assert index == indexs[-1]
assert not index # FLAT is the last index_type, drop all indexes in server
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_different_index_repeatedly_B(self, connect, collection):
@ -273,7 +264,7 @@ class TestIndexBase:
assert index == indexs[-1]
# assert not index # FLAT is the last index_type, drop all indexes in server
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_ip(self, connect, collection, get_simple_index):
'''
@ -288,7 +279,7 @@ class TestIndexBase:
index = connect.describe_index(collection, field_name)
assert index == get_simple_index
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_no_vectors_ip(self, connect, collection, get_simple_index):
'''
@ -302,7 +293,6 @@ class TestIndexBase:
index = connect.describe_index(collection, field_name)
assert index == get_simple_index
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_partition_ip(self, connect, collection, get_simple_index):
'''
@ -318,7 +308,7 @@ class TestIndexBase:
index = connect.describe_index(collection, field_name)
assert index == get_simple_index
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_partition_flush_ip(self, connect, collection, get_simple_index):
'''
@ -335,7 +325,7 @@ class TestIndexBase:
index = connect.describe_index(collection, field_name)
assert index == get_simple_index
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_search_with_query_vectors_ip(self, connect, collection, get_simple_index, get_nq):
'''
@ -357,7 +347,6 @@ class TestIndexBase:
res = connect.search(collection, query)
assert len(res) == nq
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.timeout(BUILD_TIMEOUT)
@pytest.mark.level(2)
def test_create_index_multithread_ip(self, connect, collection, args):
@ -386,7 +375,6 @@ class TestIndexBase:
for t in threads:
t.join()
@pytest.mark.tags(CaseLabel.tags_0331)
def test_create_index_collection_not_existed_ip(self, connect, collection):
'''
target: test create index interface when collection name not existed
@ -399,7 +387,7 @@ class TestIndexBase:
with pytest.raises(Exception) as e:
connect.create_index(collection_name, field_name, default_index)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_no_vectors_insert_ip(self, connect, collection):
'''
@ -417,7 +405,6 @@ class TestIndexBase:
index = connect.describe_index(collection, field_name)
assert index == default_index
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_same_index_repeatedly_ip(self, connect, collection):
@ -433,7 +420,6 @@ class TestIndexBase:
index = connect.describe_index(collection, field_name)
assert index == default_index
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_different_index_repeatedly_ip(self, connect, collection):
@ -462,7 +448,7 @@ class TestIndexBase:
The following cases are used to test `drop_index` function
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_drop_index(self, connect, collection, get_simple_index):
'''
target: test drop index interface
@ -476,7 +462,6 @@ class TestIndexBase:
assert not index
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_drop_index_repeatedly(self, connect, collection, get_simple_index):
'''
target: test drop index repeatedly
@ -489,7 +474,6 @@ class TestIndexBase:
index = connect.describe_index(collection, field_name)
assert not index
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_drop_index_without_connect(self, dis_connect, collection):
'''
@ -500,7 +484,7 @@ class TestIndexBase:
with pytest.raises(Exception) as e:
dis_connect.drop_index(collection, field_name)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_drop_index_collection_not_existed(self, connect):
'''
target: test drop index interface when collection name not existed
@ -512,7 +496,7 @@ class TestIndexBase:
with pytest.raises(Exception) as e:
connect.drop_index(collection_name, field_name)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_drop_index_collection_not_create(self, connect, collection):
'''
target: test drop index interface when index not created
@ -522,7 +506,6 @@ class TestIndexBase:
# no create index
connect.drop_index(collection, field_name)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_create_drop_index_repeatedly(self, connect, collection, get_simple_index):
'''
@ -534,7 +517,6 @@ class TestIndexBase:
connect.create_index(collection, field_name, get_simple_index)
connect.drop_index(collection, field_name)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_drop_index_ip(self, connect, collection, get_simple_index):
'''
target: test drop index interface
@ -549,7 +531,6 @@ class TestIndexBase:
assert not index
@pytest.mark.level(2)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_drop_index_repeatedly_ip(self, connect, collection, get_simple_index):
'''
target: test drop index repeatedly
@ -563,7 +544,6 @@ class TestIndexBase:
index = connect.describe_index(collection, field_name)
assert not index
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_drop_index_without_connect_ip(self, dis_connect, collection):
'''
@ -574,7 +554,6 @@ class TestIndexBase:
with pytest.raises(Exception) as e:
dis_connect.drop_index(collection, field_name)
@pytest.mark.tags(CaseLabel.tags_0331)
def test_drop_index_collection_not_create_ip(self, connect, collection):
'''
target: test drop index interface when index not created
@ -585,7 +564,6 @@ class TestIndexBase:
# no create index
connect.drop_index(collection, field_name)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_create_drop_index_repeatedly_ip(self, connect, collection, get_simple_index):
'''
@ -598,7 +576,7 @@ class TestIndexBase:
connect.create_index(collection, field_name, get_simple_index)
connect.drop_index(collection, field_name)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_PQ_without_nbits(self, connect, collection):
PQ_index = {"index_type": "IVF_PQ", "params": {"nlist": 128, "m": 16}, "metric_type": "L2"}
ids = connect.insert(collection, default_entities)
@ -653,8 +631,6 @@ class TestIndexBinary:
The following cases are used to test `create_index` function
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index(self, connect, binary_collection, get_jaccard_index):
'''
@ -667,7 +643,7 @@ class TestIndexBinary:
binary_index = connect.describe_index(binary_collection, binary_field_name)
assert binary_index == get_jaccard_index
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_partition(self, connect, binary_collection, get_jaccard_index):
'''
@ -681,7 +657,7 @@ class TestIndexBinary:
binary_index = connect.describe_index(binary_collection, binary_field_name)
assert binary_index == get_jaccard_index
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_search_with_query_vectors(self, connect, binary_collection, get_jaccard_index, get_nq):
'''
@ -700,7 +676,6 @@ class TestIndexBinary:
res = connect.search(binary_collection, query, search_params=search_param)
assert len(res) == nq
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_invalid_metric_type_binary(self, connect, binary_collection, get_l2_index):
'''
@ -767,7 +742,6 @@ class TestIndexBinary:
The following cases are used to test `drop_index` function
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331)
def test_drop_index(self, connect, binary_collection, get_jaccard_index):
'''
target: test drop index interface
@ -781,7 +755,7 @@ class TestIndexBinary:
binary_index = connect.describe_index(binary_collection, binary_field_name)
assert not binary_index
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_drop_index_partition(self, connect, binary_collection, get_jaccard_index):
'''
target: test drop index interface
@ -809,14 +783,13 @@ class TestIndexInvalid(object):
def get_collection_name(self, request):
yield request.param
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@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.tags(CaseLabel.tags_0331)
@pytest.mark.level(1)
def test_drop_index_with_invalid_collection_name(self, connect, get_collection_name):
collection_name = get_collection_name
@ -830,7 +803,6 @@ class TestIndexInvalid(object):
def get_index(self, request):
yield request.param
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_create_index_with_invalid_index_params(self, connect, collection, get_index):
logging.getLogger().info(get_index)
@ -869,8 +841,6 @@ class TestIndexAsync:
The following cases are used to test `create_index` function
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index(self, connect, collection, get_simple_index):
'''
@ -886,7 +856,7 @@ class TestIndexAsync:
# TODO:
logging.getLogger().info(res)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_drop(self, connect, collection, get_simple_index):
'''
@ -900,7 +870,6 @@ class TestIndexAsync:
logging.getLogger().info("DROP")
connect.drop_collection(collection)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_create_index_with_invalid_collection_name(self, connect):
collection_name = " "
@ -908,7 +877,7 @@ class TestIndexAsync:
future = connect.create_index(collection_name, field_name, default_index, _async=True)
res = future.result()
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_callback(self, connect, collection, get_simple_index):
'''

View File

@ -17,8 +17,7 @@ class TestCreateBase:
The following cases are used to test `create_partition` function
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_partition_a(self, connect, collection):
'''
target: test create partition, check status returned
@ -27,8 +26,6 @@ class TestCreateBase:
'''
connect.create_partition(collection, default_tag)
# TODO: enable
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
@pytest.mark.timeout(600)
def test_create_partition_limit(self, connect, collection, args):
@ -58,7 +55,7 @@ class TestCreateBase:
with pytest.raises(Exception) as e:
connect.create_partition(collection, tag_tmp)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_partition_repeat(self, connect, collection):
'''
target: test create partition, check status returned
@ -75,7 +72,6 @@ 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.tags_0331)
def test_create_partition_collection_not_existed(self, connect):
'''
target: test create partition, its owner collection name not existed in db, check status returned
@ -91,7 +87,7 @@ class TestCreateBase:
message = getattr(e, 'message', "The exception does not contain the field of message.")
assert message == "create partition failed: can't find collection: %s" % collection_name
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_partition_tag_name_None(self, connect, collection):
'''
target: test create partition, tag name set None, check status returned
@ -104,7 +100,7 @@ class TestCreateBase:
except Exception as e:
assert e.args[0] == "`partition_tag` value None is illegal"
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_different_partition_tags(self, connect, collection):
'''
target: test create partition twice with different names
@ -116,7 +112,7 @@ class TestCreateBase:
connect.create_partition(collection, tag_name)
assert compare_list_elements(connect.list_partitions(collection), [default_tag, tag_name, '_default'])
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_partition_insert_default(self, connect, id_collection):
'''
target: test create partition, and insert vectors, check status returned
@ -128,7 +124,7 @@ class TestCreateBase:
insert_ids = connect.insert(id_collection, default_entities, ids)
assert len(insert_ids) == len(ids)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_partition_insert_with_tag(self, connect, id_collection):
'''
target: test create partition, and insert vectors, check status returned
@ -140,7 +136,7 @@ class TestCreateBase:
insert_ids = connect.insert(id_collection, default_entities, ids, partition_tag=default_tag)
assert len(insert_ids) == len(ids)
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_partition_insert_with_tag_not_existed(self, connect, collection):
'''
target: test create partition, and insert vectors, check status returned
@ -158,7 +154,7 @@ class TestCreateBase:
message = getattr(e, 'message', "The exception does not contain the field of message.")
assert message == "partitionID of partitionName:%s can not be find" % tag_new
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_create_partition_insert_same_tags(self, connect, id_collection):
'''
target: test create partition, and insert vectors, check status returned
@ -176,7 +172,6 @@ class TestCreateBase:
res = connect.get_collection_stats(id_collection)
assert res["row_count"] == default_nb * 2
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_create_partition_insert_same_tags_two_collections(self, connect, collection):
'''
@ -206,8 +201,7 @@ class TestShowBase:
The following cases are used to test `list_partitions` function
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_list_partitions(self, connect, collection):
'''
target: test show partitions, check status and partitions returned
@ -217,7 +211,7 @@ class TestShowBase:
connect.create_partition(collection, default_tag)
assert compare_list_elements(connect.list_partitions(collection), [default_tag, '_default'])
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_list_partitions_no_partition(self, connect, collection):
'''
target: test show partitions with collection name, check status and partitions returned
@ -227,7 +221,7 @@ class TestShowBase:
res = connect.list_partitions(collection)
assert compare_list_elements(res, ['_default'])
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_show_multi_partitions(self, connect, collection):
'''
target: test show partitions, check status and partitions returned
@ -255,7 +249,7 @@ class TestHasBase:
def get_tag_name(self, request):
yield request.param
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_has_partition_a(self, connect, collection):
'''
target: test has_partition, check status and result
@ -267,7 +261,7 @@ class TestHasBase:
logging.getLogger().info(res)
assert res
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_has_partition_multi_partitions(self, connect, collection):
'''
target: test has_partition, check status and result
@ -280,7 +274,7 @@ class TestHasBase:
res = connect.has_partition(collection, tag_name)
assert res
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_has_partition_tag_not_existed(self, connect, collection):
'''
target: test has_partition, check status and result
@ -291,7 +285,7 @@ class TestHasBase:
logging.getLogger().info(res)
assert not res
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_has_partition_collection_not_existed(self, connect, collection):
'''
target: test has_partition, check status and result
@ -307,7 +301,6 @@ 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.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_has_partition_with_invalid_tag_name(self, connect, collection, get_tag_name):
'''
@ -328,8 +321,7 @@ class TestDropBase:
The following cases are used to test `drop_partition` function
******************************************************************
"""
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_drop_partition_a(self, connect, collection):
'''
target: test drop partition, check status and partition if existed
@ -343,7 +335,7 @@ class TestDropBase:
res2 = connect.list_partitions(collection)
assert default_tag not in res2
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_drop_partition_tag_not_existed(self, connect, collection):
'''
target: test drop partition, but tag not existed
@ -360,7 +352,7 @@ class TestDropBase:
message = getattr(e, 'message', "The exception does not contain the field of message.")
assert message == "DropPartition failed: partition %s does not exist" % new_tag
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_drop_partition_tag_not_existed_A(self, connect, collection):
'''
target: test drop partition, but collection not existed
@ -377,7 +369,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_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
@pytest.mark.level(2)
def test_drop_partition_repeatedly(self, connect, collection):
'''
@ -398,7 +390,7 @@ class TestDropBase:
tag_list = connect.list_partitions(collection)
assert default_tag not in tag_list
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_drop_partition_create(self, connect, collection):
'''
target: test drop partition, and create again, check status
@ -429,7 +421,6 @@ class TestNameInvalid(object):
def get_collection_name(self, request):
yield request.param
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_drop_partition_with_invalid_collection_name(self, connect, collection, get_collection_name):
'''
@ -442,7 +433,6 @@ class TestNameInvalid(object):
with pytest.raises(Exception) as e:
connect.drop_partition(collection_name, default_tag)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_drop_partition_with_invalid_tag_name(self, connect, collection, get_tag_name):
'''
@ -455,7 +445,6 @@ class TestNameInvalid(object):
with pytest.raises(Exception) as e:
connect.drop_partition(collection, tag_name)
@pytest.mark.tags(CaseLabel.tags_0331)
@pytest.mark.level(2)
def test_list_partitions_with_invalid_collection_name(self, connect, collection, get_collection_name):
'''
@ -471,7 +460,7 @@ class TestNameInvalid(object):
class TestNewCase(object):
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_drop_default_partition_A(self, connect, collection):
'''
target: test drop partition of default, check status returned
@ -488,7 +477,7 @@ class TestNewCase(object):
list_partition = connect.list_partitions(collection)
assert '_default' in list_partition
@pytest.mark.tags(CaseLabel.tags_0331, CaseLabel.tags_l1, CaseLabel.tags_smoke)
@pytest.mark.tags(CaseLabel.tags_smoke)
def test_drop_default_partition_B(self, connect, collection):
'''
target: test drop partition of default, check status returned

View File

@ -1008,6 +1008,4 @@ class MyThread(threading.Thread):
class CaseLabel:
tags_0331 = "0331"
tags_l1 = "l1"
tags_smoke = "smoke"