From 403212c5fa6f874e3003b55d3ace04de6c91b3e8 Mon Sep 17 00:00:00 2001 From: XuanYang-cn Date: Mon, 8 Mar 2021 15:00:08 +0800 Subject: [PATCH] Fix describe_index test cases Signed-off-by: XuanYang-cn --- internal/proxynode/impl.go | 2 +- tests/python_test/requirements.txt | 2 +- tests/python_test/test_index.py | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/internal/proxynode/impl.go b/internal/proxynode/impl.go index 0a0d38189c..cb30672af0 100644 --- a/internal/proxynode/impl.go +++ b/internal/proxynode/impl.go @@ -518,7 +518,7 @@ func (node *ProxyNode) DescribeIndex(ctx context.Context, request *milvuspb.Desc if err != nil { return &milvuspb.DescribeIndexResponse{ Status: &commonpb.Status{ - ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR, + ErrorCode: dit.result.Status.GetErrorCode(), Reason: err.Error(), }, }, nil diff --git a/tests/python_test/requirements.txt b/tests/python_test/requirements.txt index 394d9049f3..8114a4f569 100644 --- a/tests/python_test/requirements.txt +++ b/tests/python_test/requirements.txt @@ -2,7 +2,7 @@ grpcio==1.26.0 grpcio-tools==1.26.0 numpy==1.18.1 pytest-cov==2.8.1 -pymilvus-distributed==0.0.36 +pymilvus-distributed==0.0.37 sklearn==0.0 pytest==4.5.0 pytest-timeout==1.3.3 diff --git a/tests/python_test/test_index.py b/tests/python_test/test_index.py index 7f102ad786..9a45248c26 100644 --- a/tests/python_test/test_index.py +++ b/tests/python_test/test_index.py @@ -419,6 +419,7 @@ class TestIndexBase: The following cases are used to test `drop_index` function ****************************************************************** """ + @pytest.mark.tags("0331") def test_drop_index(self, connect, collection, get_simple_index): ''' target: test drop index interface @@ -432,6 +433,7 @@ class TestIndexBase: assert not index @pytest.mark.level(2) + @pytest.mark.tags("0331") def test_drop_index_repeatedly(self, connect, collection, get_simple_index): ''' target: test drop index repeatedly @@ -489,6 +491,7 @@ class TestIndexBase: connect.create_index(collection, field_name, get_simple_index) connect.drop_index(collection, field_name) + @pytest.mark.tags("0331") def test_drop_index_ip(self, connect, collection, get_simple_index): ''' target: test drop index interface @@ -503,6 +506,7 @@ class TestIndexBase: assert not index @pytest.mark.level(2) + @pytest.mark.tags("0331") def test_drop_index_repeatedly_ip(self, connect, collection, get_simple_index): ''' target: test drop index repeatedly @@ -714,6 +718,7 @@ class TestIndexBinary: The following cases are used to test `drop_index` function ****************************************************************** """ + @pytest.mark.tags("0331") def test_drop_index(self, connect, binary_collection, get_jaccard_index): ''' target: test drop index interface @@ -727,6 +732,7 @@ class TestIndexBinary: binary_index = connect.describe_index(binary_collection, binary_field_name) assert not binary_index + @pytest.mark.tags("0331") def test_drop_index_partition(self, connect, binary_collection, get_jaccard_index): ''' target: test drop index interface