diff --git a/tests/python/requirements.txt b/tests/python/requirements.txt index 9bee462aee..98dd4e02c7 100644 --- a/tests/python/requirements.txt +++ b/tests/python/requirements.txt @@ -4,5 +4,5 @@ numpy==1.18.1 pytest==5.3.4 pytest-cov==2.8.1 pytest-timeout==1.3.4 -pymilvus-distributed==0.0.10 +pymilvus-distributed==0.0.14 sklearn==0.0 diff --git a/tests/python/test_bulk_insert.py b/tests/python/test_bulk_insert.py index d8ff5cbd7a..97f3724ec0 100644 --- a/tests/python/test_bulk_insert.py +++ b/tests/python/test_bulk_insert.py @@ -101,7 +101,6 @@ class TestInsertBase: connect.flush([collection]) connect.drop_collection(collection) - @pytest.mark.skip("create index") @pytest.mark.timeout(ADD_TIMEOUT) def test_insert_create_index(self, connect, collection, get_simple_index): ''' @@ -119,7 +118,6 @@ class TestInsertBase: if field["name"] == field_name: assert field["indexes"][0] == get_simple_index - @pytest.mark.skip("create index") @pytest.mark.timeout(ADD_TIMEOUT) def test_insert_create_index_new(self, connect, collection, get_simple_index): ''' @@ -137,7 +135,6 @@ class TestInsertBase: if field["name"] == field_name: assert field["indexes"][0] == get_simple_index - @pytest.mark.skip("create index") @pytest.mark.timeout(ADD_TIMEOUT) def test_insert_after_create_index(self, connect, collection, get_simple_index): ''' @@ -154,7 +151,6 @@ class TestInsertBase: if field["name"] == field_name: assert field["indexes"][0] == get_simple_index - # @pytest.mark.skip(" later ") @pytest.mark.timeout(ADD_TIMEOUT) def test_insert_search(self, connect, collection): ''' @@ -645,7 +641,6 @@ class TestInsertBinary: connect.flush([binary_collection]) assert connect.count_entities(binary_collection) == default_nb - @pytest.mark.skip("create index") def test_insert_binary_after_create_index(self, connect, binary_collection, get_binary_index): ''' target: test insert binary entities after build index @@ -662,7 +657,6 @@ class TestInsertBinary: if field["name"] == binary_field_name: assert field["indexes"][0] == get_binary_index - @pytest.mark.skip("create index") @pytest.mark.timeout(ADD_TIMEOUT) def test_insert_binary_create_index(self, connect, binary_collection, get_binary_index): ''' @@ -863,7 +857,6 @@ class TestInsertMultiCollections: connect.flush([collection_name]) assert len(ids) == 1 - @pytest.mark.skip("create index") @pytest.mark.timeout(ADD_TIMEOUT) def test_create_index_insert_vector_another(self, connect, collection, get_simple_index): ''' @@ -877,7 +870,7 @@ class TestInsertMultiCollections: ids = connect.bulk_insert(collection, default_entity) connect.drop_collection(collection_name) - @pytest.mark.skip("create index") + @pytest.mark.skip("count entities") @pytest.mark.timeout(ADD_TIMEOUT) def test_insert_vector_create_index_another(self, connect, collection, get_simple_index): ''' @@ -892,7 +885,7 @@ class TestInsertMultiCollections: count = connect.count_entities(collection_name) assert count == 0 - @pytest.mark.skip("create index") + @pytest.mark.skip("count entities") @pytest.mark.timeout(ADD_TIMEOUT) def test_insert_vector_sleep_create_index_another(self, connect, collection, get_simple_index): ''' diff --git a/tests/python/test_insert.py b/tests/python/test_insert.py index 14948a4c1f..3c0420aa10 100644 --- a/tests/python/test_insert.py +++ b/tests/python/test_insert.py @@ -101,7 +101,6 @@ class TestInsertBase: connect.flush([collection]) connect.drop_collection(collection) - @pytest.mark.skip("create_index") @pytest.mark.timeout(ADD_TIMEOUT) def test_insert_create_index(self, connect, collection, get_simple_index): ''' @@ -119,7 +118,6 @@ class TestInsertBase: if field["name"] == field_name: assert field["indexes"][0] == get_simple_index - @pytest.mark.skip("create_index") @pytest.mark.timeout(ADD_TIMEOUT) def test_insert_after_create_index(self, connect, collection, get_simple_index): ''' @@ -136,7 +134,6 @@ class TestInsertBase: if field["name"] == field_name: assert field["indexes"][0] == get_simple_index - @pytest.mark.skip(" todo fix search") @pytest.mark.timeout(ADD_TIMEOUT) def test_insert_search(self, connect, collection): ''' @@ -313,7 +310,6 @@ class TestInsertBinary: connect.flush([binary_collection]) assert connect.count_entities(binary_collection) == default_nb - @pytest.mark.skip("create index") def test_insert_binary_after_create_index(self, connect, binary_collection, get_binary_index): ''' target: test insert binary entities after build index @@ -330,7 +326,6 @@ class TestInsertBinary: if field["name"] == binary_field_name: assert field["indexes"][0] == get_binary_index - @pytest.mark.skip("create index") @pytest.mark.timeout(ADD_TIMEOUT) def test_insert_binary_create_index(self, connect, binary_collection, get_binary_index): ''' diff --git a/tests/python/utils.py b/tests/python/utils.py index dfc99eb37e..282f7e36f7 100644 --- a/tests/python/utils.py +++ b/tests/python/utils.py @@ -55,7 +55,7 @@ default_index_params = [ {"nlist": 128}, {"nlist": 128}, {"nlist": 128}, - {"nlist": 128, "m": 16}, + {"nlist": 128, "m": 16, "nbits": 8}, {"M": 48, "efConstruction": 500}, # {"search_length": 50, "out_degree": 40, "candidate_pool_size": 100, "knng": 50}, {"n_trees": 50}, @@ -281,9 +281,9 @@ def gen_entities(nb, is_normal=False): def gen_entities_new(nb, is_normal=False): vectors = gen_vectors(nb, default_dim, is_normal) entities = [ - {"name": "int64", "values": [i for i in range(nb)]}, - {"name": "float", "values": [float(i) for i in range(nb)]}, - {"name": default_float_vec_field_name, "values": vectors} + {"name": "int64", "type": DataType.INT64, "values": [i for i in range(nb)]}, + {"name": "float", "type": DataType.FLOAT, "values": [float(i) for i in range(nb)]}, + {"name": default_float_vec_field_name, "type": DataType.FLOAT_VECTOR, "values": vectors} ] return entities