[skip ci]change test index level (#3150)

Signed-off-by: Wang Xiangyu <xy.wang@zilliz.com>
pull/3151/head
Wang Xiangyu 2020-08-05 23:38:49 +08:00 committed by GitHub
parent b869788e17
commit fccf91fa51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 0 deletions

View File

@ -58,6 +58,7 @@ class TestIndexBase:
******************************************************************
"""
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index(self, connect, collection, get_simple_index):
'''
@ -68,6 +69,7 @@ class TestIndexBase:
ids = connect.insert(collection, entities)
connect.create_index(collection, field_name, get_simple_index)
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_no_vectors(self, connect, collection, get_simple_index):
'''
@ -77,6 +79,7 @@ class TestIndexBase:
'''
connect.create_index(collection, field_name, get_simple_index)
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_partition(self, connect, collection, get_simple_index):
'''
@ -89,6 +92,7 @@ class TestIndexBase:
connect.flush([collection])
connect.create_index(collection, field_name, get_simple_index)
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_partition_flush(self, connect, collection, get_simple_index):
'''
@ -101,6 +105,7 @@ class TestIndexBase:
connect.flush()
connect.create_index(collection, field_name, get_simple_index)
@pytest.mark.level(2)
@pytest.mark.level(2)
def test_create_index_without_connect(self, dis_connect, collection):
'''
@ -111,6 +116,7 @@ class TestIndexBase:
with pytest.raises(Exception) as e:
dis_connect.create_index(collection, field_name, get_simple_index)
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_search_with_query_vectors(self, connect, collection, get_simple_index, get_nq):
'''
@ -152,6 +158,7 @@ class TestIndexBase:
for t in threads:
t.join()
@pytest.mark.level(2)
def test_create_index_collection_not_existed(self, connect):
'''
target: test create index interface when collection name not existed
@ -163,6 +170,7 @@ class TestIndexBase:
with pytest.raises(Exception) as e:
connect.create_index(collection, field_name, default_index)
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_no_vectors_insert(self, connect, collection, get_simple_index):
'''
@ -203,6 +211,7 @@ class TestIndexBase:
assert stats["partitions"][0]["segments"][0]["index_name"] == index["index_type"]
assert stats["row_count"] == nb
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_ip(self, connect, collection, get_simple_index):
'''
@ -214,6 +223,7 @@ class TestIndexBase:
get_simple_index["metric_type"] = "IP"
connect.create_index(collection, field_name, get_simple_index)
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_no_vectors_ip(self, connect, collection, get_simple_index):
'''
@ -224,6 +234,7 @@ class TestIndexBase:
get_simple_index["metric_type"] = "IP"
connect.create_index(collection, field_name, get_simple_index)
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_partition_ip(self, connect, collection, get_simple_index):
'''
@ -237,6 +248,7 @@ class TestIndexBase:
get_simple_index["metric_type"] = "IP"
connect.create_index(collection, field_name, get_simple_index)
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_partition_flush_ip(self, connect, collection, get_simple_index):
'''
@ -250,6 +262,7 @@ class TestIndexBase:
get_simple_index["metric_type"] = "IP"
connect.create_index(collection, field_name, get_simple_index)
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_search_with_query_vectors_ip(self, connect, collection, get_simple_index, get_nq):
'''
@ -358,6 +371,7 @@ class TestIndexBase:
******************************************************************
"""
@pytest.mark.level(2)
def test_drop_index(self, connect, collection, get_simple_index):
'''
target: test drop index interface
@ -397,6 +411,7 @@ class TestIndexBase:
with pytest.raises(Exception) as e:
dis_connect.drop_index(collection, field_name)
@pytest.mark.level(2)
def test_drop_index_collection_not_existed(self, connect):
'''
target: test drop index interface when collection name not existed
@ -408,6 +423,7 @@ class TestIndexBase:
with pytest.raises(Exception) as e:
connect.drop_index(collection_name, field_name)
@pytest.mark.level(2)
def test_drop_index_collection_not_create(self, connect, collection):
'''
target: test drop index interface when index not created
@ -429,6 +445,7 @@ class TestIndexBase:
connect.create_index(collection, field_name, get_simple_index)
connect.drop_index(collection, field_name)
@pytest.mark.level(2)
def test_drop_index_ip(self, connect, collection, get_simple_index):
'''
target: test drop index interface
@ -470,6 +487,7 @@ class TestIndexBase:
with pytest.raises(Exception) as e:
dis_connect.drop_index(collection, field_name)
@pytest.mark.level(2)
def test_drop_index_collection_not_create_ip(self, connect, collection):
'''
target: test drop index interface when index not created
@ -769,6 +787,7 @@ class TestIndexAsync:
******************************************************************
"""
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index(self, connect, collection, get_simple_index):
'''
@ -790,6 +809,7 @@ class TestIndexAsync:
with pytest.raises(Exception) as e:
res = future.result()
@pytest.mark.level(2)
@pytest.mark.timeout(BUILD_TIMEOUT)
def test_create_index_callback(self, connect, collection, get_simple_index):
'''