From 95ddd48d6e7df49f7a0e8771d9bca29a78464bc7 Mon Sep 17 00:00:00 2001 From: Blank Date: Tue, 22 Sep 2026 14:51:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(startup):=20=E5=90=AF=E5=8A=A8=E5=B1=8F?= =?UTF-8?q?=E9=9A=9C=E6=B5=8B=E8=AF=95=E8=A1=A5=E6=98=BE=E5=BC=8F=E6=96=AD?= =?UTF-8?q?=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit StartHostsInOrderAsync_RoleExitsBeforeReady_ReleasesBarrier 原先只靠 两个 await 的超时副作用隐式验证屏障放行,无任何 Assert,触发 Sonar S2699 BLOCKER。收尾改为接收 StartHostsInOrderAsync 返回的运行任务 列表并断言 Count 为 2,与相邻屏障用例同款;屏障死锁路径仍由既有 5 秒超时窗口覆盖,生产代码零改动。 Linear: GFX-855 --- Tests/GameFrameX.Tests/StartUp/AppEnterShutdownOrderTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tests/GameFrameX.Tests/StartUp/AppEnterShutdownOrderTests.cs b/Tests/GameFrameX.Tests/StartUp/AppEnterShutdownOrderTests.cs index f7e70663..bc07965a 100644 --- a/Tests/GameFrameX.Tests/StartUp/AppEnterShutdownOrderTests.cs +++ b/Tests/GameFrameX.Tests/StartUp/AppEnterShutdownOrderTests.cs @@ -160,7 +160,8 @@ public async Task StartHostsInOrderAsync_RoleExitsBeforeReady_ReleasesBarrier() hostBeta.MarkReady(); hostBeta.CompleteRun(); - await startTask.WaitAsync(TimeSpan.FromSeconds(5)); + var startUpTasks = await startTask.WaitAsync(TimeSpan.FromSeconds(5)); + Assert.Equal(2, startUpTasks.Count); } ///