format code of test_utility.py (#12505)

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
pull/12564/head
zhuwenxing 2021-12-01 20:13:32 +08:00 committed by GitHub
parent dde2795bcb
commit 7f399b077d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 11 deletions

View File

@ -19,6 +19,7 @@ default_nb = ct.default_nb
num_loaded_entities = "num_loaded_entities"
num_total_entities = "num_total_entities"
def get_segment_distribution(res):
"""
Get segment distribution
@ -1458,7 +1459,7 @@ class TestUtilityAdvanced(TestcaseBase):
all_querynodes = [node["identifier"] for node in ms.query_nodes]
assert len(all_querynodes) > 1
all_querynodes = sorted(all_querynodes,
key=lambda x: len(segment_distribution[x]["sealed"]) \
key=lambda x: len(segment_distribution[x]["sealed"])
if x in segment_distribution else 0, reverse=True)
src_node_id = all_querynodes[0]
des_node_ids = all_querynodes[1:]