test: fix unstable testcase caused by server refactor (#37545)

issue: https://github.com/milvus-io/milvus/issues/37533

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
pull/37562/head
zhuwenxing 2024-11-09 09:58:26 +08:00 committed by GitHub
parent 70605cf5b3
commit ffdde391e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 4 deletions

View File

@ -1621,7 +1621,7 @@ class TestUtilityAdvanced(TestcaseBase):
df = cf.gen_default_dataframe_data(nb)
collection_w.insert(df)
# get sealed segments
collection_w.num_entities
collection_w.flush()
# get growing segments
collection_w.insert(df)
collection_w.load()
@ -1635,6 +1635,9 @@ class TestUtilityAdvanced(TestcaseBase):
src_node_id = all_querynodes[0]
dst_node_ids = all_querynodes[1:]
sealed_segment_ids = segment_distribution[src_node_id]["sealed"]
if len(segment_distribution[src_node_id]["sealed"]) == 0:
sealed_segment_ids = [0] # add a segment id which is not exist
else:
# add a segment id which is not exist
sealed_segment_ids.append(max(segment_distribution[src_node_id]["sealed"]) + 1)
# load balance