mirror of https://github.com/milvus-io/milvus.git
add test cases for index_file_size (#5708)
* add test cases for index_file_size Signed-off-by: zw <zw@milvus.io>pull/5752/head
parent
84318f251b
commit
69638abf20
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env groovy
|
||||
|
||||
String cron_timezone = "TZ=Asia/Shanghai"
|
||||
String cron_string = BRANCH_NAME == "master" ? "50 22 * * * " : ""
|
||||
String cron_string = BRANCH_NAME == "1.1" ? "50 22 * * * " : ""
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
|
|
|
@ -219,6 +219,20 @@ class TestCollection:
|
|||
logging.getLogger().info(result)
|
||||
assert result.index_file_size == 1024
|
||||
|
||||
def test_create_collection_max_file_size(self, connect):
|
||||
'''
|
||||
target: test create collection with no index_file_size params
|
||||
method: create collection with corrent params
|
||||
expected: create status return ok, use default 1024
|
||||
'''
|
||||
collection_name = gen_unique_str("test_collection")
|
||||
param = {'collection_name': collection_name,
|
||||
'dimension': dim,
|
||||
'index_file_size': 1024 * 129,
|
||||
'metric_type': MetricType.L2}
|
||||
status = connect.create_collection(param)
|
||||
assert not status.OK()
|
||||
|
||||
def test_create_collection_no_metric_type(self, connect):
|
||||
'''
|
||||
target: test create collection with no metric_type params
|
||||
|
@ -1159,7 +1173,7 @@ def gen_sequence():
|
|||
class TestCollectionLogic(object):
|
||||
@pytest.mark.parametrize("logic_seq", gen_sequence())
|
||||
@pytest.mark.level(2)
|
||||
def test_logic(self, connect, logic_seq, args):
|
||||
def _test_logic(self, connect, logic_seq, args):
|
||||
if args["handler"] == "HTTP":
|
||||
pytest.skip("Skip in http mode")
|
||||
if self.is_right(logic_seq):
|
||||
|
|
|
@ -457,7 +457,6 @@ class TestDeleteBinary:
|
|||
assert status.OK()
|
||||
assert len(res[0]) == 0
|
||||
|
||||
# TODO: soft delete
|
||||
def test_delete_vector_collection_count(self, connect, jac_collection):
|
||||
'''
|
||||
target: test delete vector
|
||||
|
|
|
@ -474,6 +474,19 @@ class TestGPUConfig:
|
|||
assert status.OK()
|
||||
assert config_value == "true" or config_value == "false"
|
||||
|
||||
@pytest.mark.timeout(CONFIG_TIMEOUT)
|
||||
def test_get_gpu_cache_enable_valid(self, connect, collection):
|
||||
'''
|
||||
target: get gpu_cache
|
||||
method: call get_config correctly
|
||||
expected: status ok
|
||||
'''
|
||||
if str(connect._cmd("mode")[1]) == "CPU":
|
||||
pytest.skip("Only support GPU mode")
|
||||
status, config_value = connect.get_config("gpu", "cache.enable")
|
||||
assert status.OK()
|
||||
assert config_value == "true" or config_value == "false"
|
||||
|
||||
@pytest.mark.level(2)
|
||||
def test_get_cache_size_invalid_parent_key(self, connect, collection):
|
||||
'''
|
||||
|
|
Loading…
Reference in New Issue