From f2f0a10a9e53f85e950bb461b3a1f08b1be2685a Mon Sep 17 00:00:00 2001 From: "bobo.yang" Date: Fri, 21 Mar 2025 21:24:46 +0800 Subject: [PATCH] refactor: Remove redundant task query in test API upload command - Remove unnecessary API call to fetch tasks - Simplify test execution flow by eliminating wait_for_task_done call - Improve code efficiency in the test API upload command --- community/test/api/upload/command.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/community/test/api/upload/command.py b/community/test/api/upload/command.py index 33876c1..0a0e93e 100755 --- a/community/test/api/upload/command.py +++ b/community/test/api/upload/command.py @@ -230,14 +230,6 @@ def main(): api_path_id = get_path_op_id(api_path, method) with Step("开始查询测试脚本执行结果..."): while True: - res = session.get( - f"{SERVER_URL}/autotest/projects/{PROJECT_ID}/tasks", - params={"page": 1, "size": 1}, - ) - ret = res.json() - task = ret["tasks"][0] - task_id = task["id"] - wait_for_task_done(task_id) testcase = get_testcase(api_path_id) last_testcode_passed = testcase["last_testcode_passed"] if last_testcode_passed: