From f81fffcf5048b0b53e444dcb5e63a5884d819445 Mon Sep 17 00:00:00 2001 From: "Mr.Xia" <1424473282@qq.com> Date: Tue, 7 Apr 2026 20:42:32 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E5=A2=9E=E5=8A=A0=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E6=97=B6=E9=97=B4=E4=BB=A5=E6=8F=90=E5=8D=87?= =?UTF-8?q?=E7=A8=B3=E5=AE=9A=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将模拟赛事的等待超时从60秒延长至180秒(实时进度)和15秒延长至30秒(非实时) - 避免测试因网络延迟或处理时间不足而意外失败 --- danding_bot/plugins/group_horse_racing/test_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/danding_bot/plugins/group_horse_racing/test_commands.py b/danding_bot/plugins/group_horse_racing/test_commands.py index 5516dbe..3722b3f 100644 --- a/danding_bot/plugins/group_horse_racing/test_commands.py +++ b/danding_bot/plugins/group_horse_racing/test_commands.py @@ -196,7 +196,7 @@ class _InMemoryPointsService: async def get_balance(self, user_id: str) -> int: self.calls.append(("get_balance", {"user_id": user_id})) - return 0 + return 8888 class _NoopMessageService: @@ -315,7 +315,7 @@ async def handle_test_simulate_race(bot: Bot, event: Event): await test_simulate_race_cmd.send("阶段:执行赛程(后台任务)") start_task = asyncio.create_task(commands_mod.run_race_with_settlement(fake_bot, room, scope)) commands_mod.race_engine.register_task(scope, start_task) - await asyncio.wait_for(start_task, timeout=60 if stream_progress else 15) + await asyncio.wait_for(start_task, timeout=180 if stream_progress else 30) messages = [str(m.get("message", "")) for m in fake_bot.messages] if not messages: