Commit d0b4a160 authored by zhenwu's avatar zhenwu
Browse files

re-define case level


Former-commit-id: 283c397a9be77b64ff0d0dd86cf1a4560614e03d
parent 00cd12ce
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -407,6 +407,7 @@ class TestAddBase:
    def get_vector_id(self, request):
        yield request.param

    @pytest.mark.level(2)
    def test_add_vectors_ids_invalid(self, connect, table, get_vector_id):
        '''
        target: test add vectors in table, use customize ids, which are not int64
@@ -974,6 +975,7 @@ class TestAddIP:
    def get_vector_id(self, request):
        yield request.param

    @pytest.mark.level(2)
    def test_add_vectors_ids_invalid(self, connect, ip_table, get_vector_id):
        '''
        target: test add vectors in table, use customize ids, which are not int64
@@ -1223,7 +1225,7 @@ class TestAddTableVectorsInvalid(object):
        with pytest.raises(Exception) as e:
            status, result = connect.add_vectors(table, tmp_single_vector)

    @pytest.mark.level(1)
    @pytest.mark.level(2)
    def test_add_vectors_with_invalid_vectors(self, connect, table, gen_vector):
        tmp_vectors = copy.deepcopy(self.vectors)
        tmp_vectors[1][1] = gen_vector
+5 −4
Original line number Diff line number Diff line
@@ -528,7 +528,7 @@ class TestIndexIP:
      The following cases are used to test `create_index` function
    ******************************************************************
    """

    @pytest.mark.level(2)
    @pytest.mark.timeout(BUILD_TIMEOUT)
    def test_create_index(self, connect, ip_table, get_index_params):
        '''
@@ -563,6 +563,7 @@ class TestIndexIP:
        logging.getLogger().info(index_params)
        status, ids = connect.add_vectors(ip_table, vectors)
        status = connect.create_index(ip_table, index_params)
        assert status.OK()
        logging.getLogger().info(connect.describe_index(ip_table))
        query_vecs = [vectors[0], vectors[1], vectors[2]]
        top_k = 5
@@ -933,19 +934,19 @@ class TestIndexTableInvalid(object):
    def get_table_name(self, request):
        yield request.param

    # @pytest.mark.level(1)
    @pytest.mark.level(2)
    def test_create_index_with_invalid_tablename(self, connect, get_table_name):
        table_name = get_table_name
        status = connect.create_index(table_name, random.choice(gen_index_params()))
        assert not status.OK()

    # @pytest.mark.level(1)
    @pytest.mark.level(2)
    def test_describe_index_with_invalid_tablename(self, connect, get_table_name):
        table_name = get_table_name
        status, result = connect.describe_index(table_name)
        assert not status.OK()   

    # @pytest.mark.level(1)
    @pytest.mark.level(2)
    def test_drop_index_with_invalid_tablename(self, connect, get_table_name):
        table_name = get_table_name
        status = connect.drop_index(table_name)