Add get sealed segment info testcase (#12245)

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
pull/12250/head
zhuwenxing 2021-11-24 14:23:16 +08:00 committed by GitHub
parent e72c5b9351
commit 283d7b0919
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 1 deletions

View File

@ -1382,7 +1382,7 @@ class TestUtilityAdvanced(TestcaseBase):
@pytest.mark.tags(CaseLabel.L1)
def test_get_growing_query_segment_info(self):
"""
target: test getting query segment info of collection with data
target: test getting growing query segment info of collection with data
method: init a collection, insert data, load, search, and get query segment info
expected:
1. length of segment is greater than 0
@ -1406,6 +1406,29 @@ class TestUtilityAdvanced(TestcaseBase):
cnt += r.num_rows
assert cnt == nb
@pytest.mark.tags(CaseLabel.L1)
def test_get_sealed_query_segment_info(self):
"""
target: test getting sealed query segment info of collection with data
method: init a collection, insert data, flush, load, 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
"""
c_name = cf.gen_unique_str(prefix)
collection_w = self.init_collection_wrap(name=c_name)
nb = 3000
df = cf.gen_default_dataframe_data(nb)
collection_w.insert(df)
collection_w.num_entities
collection_w.load()
res, _ = self.utility_wrap.get_query_segment_info(c_name)
assert len(res) > 0
cnt = 0
for r in res:
cnt += r.num_rows
assert cnt == nb
@pytest.mark.tags(CaseLabel.Loadbalance)
def test_load_balance_normal(self):
"""