[test]Change multi-threaded execution to serial execution (#22730)

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
zhuwenxing 2023-03-14 10:01:54 +08:00 committed by GitHub
parent 556c1cfc8a
commit c27561173d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 36 deletions

View File

@ -45,10 +45,3 @@ if __name__ == '__main__':
logger.info(f"data size: {data_size}")
task_1(data_size, host)
task_2(data_size, host)
tasks = []
# tasks.append(threading.Thread(target=task_1, args=(data_size, host)))
# tasks.append(threading.Thread(target=task_2, args=(data_size, host)))
# for task in tasks:
# task.start()
# for task in tasks:
# task.join()

View File

@ -111,14 +111,4 @@ if __name__ == '__main__':
task_3(data_size, host)
task_4(data_size, host)
task_5(data_size, host)
# tasks = []
# tasks.append(threading.Thread(target=task_1, args=(data_size, host)))
# tasks.append(threading.Thread(target=task_2, args=(data_size, host)))
# if len(ms.query_nodes) >= NUM_REPLICAS:
# tasks.append(threading.Thread(target=task_3, args=(data_size, host)))
# tasks.append(threading.Thread(target=task_4, args=(data_size, host)))
# tasks.append(threading.Thread(target=task_5, args=(data_size, host)))
# for task in tasks:
# task.start()
# for task in tasks:
# task.join()

View File

@ -44,10 +44,5 @@ if __name__ == '__main__':
data_size = args.data_size
host = args.host
logger.info(f"data_size: {data_size}")
tasks = []
tasks.append(threading.Thread(target=task_1, args=(data_size, host)))
tasks.append(threading.Thread(target=task_2, args=(data_size, host)))
for task in tasks:
task.start()
for task in tasks:
task.join()
task_1(data_size, host)
task_2(data_size, host)

View File

@ -83,15 +83,9 @@ if __name__ == '__main__':
logger.info(f"data size: {data_size}")
connections.connect(host=host, port=19530, timeout=60)
ms = MilvusSys()
tasks = []
tasks.append(threading.Thread(target=task_1, args=(data_size, host)))
tasks.append(threading.Thread(target=task_2, args=(data_size, host)))
task_1(data_size, host)
task_2(data_size, host)
if len(ms.query_nodes) >= NUM_REPLICAS:
tasks.append(threading.Thread(target=task_3, args=(data_size, host)))
tasks.append(threading.Thread(target=task_4, args=(data_size, host)))
tasks.append(threading.Thread(target=task_5, args=(data_size, host)))
for task in tasks:
task.start()
for task in tasks:
task.join()
task_3(data_size, host)
task_4(data_size, host)
task_5(data_size, host)