From 52b58366dc128b5b9f8b42db7adc0cca9892ee95 Mon Sep 17 00:00:00 2001 From: zhenwu Date: Mon, 2 Dec 2019 15:30:31 +0800 Subject: [PATCH] assert failed if create index with pq on ip_table on gpu, assert pass on cpu --- tests/milvus_python_test/test_index.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/milvus_python_test/test_index.py b/tests/milvus_python_test/test_index.py index 3a3ffc3857..9dc919424e 100644 --- a/tests/milvus_python_test/test_index.py +++ b/tests/milvus_python_test/test_index.py @@ -972,9 +972,11 @@ class TestIndexIP: expected: return code 0, and default index param ''' index_params = get_simple_index_params + status, mode = connect._cmd("mode") + assert status.OK() # status, ids = connect.add_vectors(ip_table, vectors) status = connect.create_index(ip_table, index_params) - if index_params["index_type"] == IndexType.IVF_PQ: + if str(mode) == "GPU" and index_params["index_type"] == IndexType.IVF_PQ: assert not status.OK() else: assert status.OK()