mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 02:48:45 +08:00
Fix get segment info testcase (#12232)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
parent
653369ee63
commit
1dfdb32254
@ -1380,20 +1380,25 @@ class TestUtilityAdvanced(TestcaseBase):
|
||||
assert len(res) == 0
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
def test_get_query_segment_info(self):
|
||||
def test_get_growing_query_segment_info(self):
|
||||
"""
|
||||
target: test getting query segment info of collection with data
|
||||
method: init a collection, insert data and get query segment info
|
||||
expected:
|
||||
method: init a collection, insert data, load, search, and get query segment info
|
||||
expected:
|
||||
1. length of segment is greater than 0
|
||||
2. the sum num_rows of each segment is equal to num of entities
|
||||
"""
|
||||
import random
|
||||
dim = 128
|
||||
c_name = cf.gen_unique_str(prefix)
|
||||
collection_w = self.init_collection_wrap(name=c_name)
|
||||
nb = 3000
|
||||
nq = 2
|
||||
df = cf.gen_default_dataframe_data(nb)
|
||||
collection_w.insert(df)
|
||||
collection_w.load()
|
||||
collection_w.load()
|
||||
vectors = [[random.random() for _ in range(dim)] for _ in range(nq)]
|
||||
collection_w.search(vectors, default_field_name, ct.default_search_params, ct.default_limit)
|
||||
res, _ = self.utility_wrap.get_query_segment_info(c_name)
|
||||
assert len(res) > 0
|
||||
cnt = 0
|
||||
|
Loading…
Reference in New Issue
Block a user