From 51768c7c95dc2f93c11d3323cd68acd76420b051 Mon Sep 17 00:00:00 2001 From: xst Date: Thu, 23 Jul 2026 17:49:29 +0800 Subject: [PATCH] fix(admin): add exception handling for SQL retry in freight accounting flow --- tests/cross_end/pages/admin/freight_accounting_page.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/cross_end/pages/admin/freight_accounting_page.py b/tests/cross_end/pages/admin/freight_accounting_page.py index 51aee74..df8e71e 100644 --- a/tests/cross_end/pages/admin/freight_accounting_page.py +++ b/tests/cross_end/pages/admin/freight_accounting_page.py @@ -139,7 +139,10 @@ class FreightAccountingPage(BasePage): # 无数据 → 执行 SQL 重试 if not self._table_has_data(): if retry_sql: - retry_sql() + try: + retry_sql() + except Exception as e: + raise RuntimeError(f"运费核算 SQL 重试失败!单号: {order_no}, 错误: {e}") self._fill_order_no(order_no) self._click_search()