From 25f28ef6c7a2bad5ecad180a108d7edc3f0dbdd1 Mon Sep 17 00:00:00 2001 From: Shangxin Date: Thu, 17 Sep 2026 13:21:51 +0000 Subject: [PATCH 1/2] chore(deps): upgrade xunit.v3, minver, system.reactive, and porta.pty - Upgrade xunit.v3.mtp-v2 from 3.2.2 to 4.0.1 across all test projects - Migrate assembly parallelization attributes from obsolete CollectionBehavior to ParallelizationAttribute - Upgrade MinVer from 6.0.0 to 8.0.0 in Directory.Packages.props, SalmonEgg.Acp, and SalmonEgg.Cli - Upgrade System.Reactive from 6.1.0 to 7.0.0 in SalmonEgg.Infrastructure - Upgrade Porta.Pty from 1.0.7 to 2.2.2 in SalmonEgg.Infrastructure.Desktop --- SalmonEgg/Directory.Packages.props | 2 +- src/SalmonEgg.Acp/SalmonEgg.Acp.csproj | 2 +- src/SalmonEgg.Cli/SalmonEgg.Cli.csproj | 2 +- .../SalmonEgg.Infrastructure.Desktop.csproj | 2 +- src/SalmonEgg.Infrastructure/SalmonEgg.Infrastructure.csproj | 2 +- .../SalmonEgg.Acp.Desktop.Tests.csproj | 2 +- tests/SalmonEgg.Acp.Tests/SalmonEgg.Acp.Tests.csproj | 2 +- .../SalmonEgg.Application.Tests.csproj | 2 +- tests/SalmonEgg.Cli.Tests/AssemblyInfo.cs | 5 +++-- tests/SalmonEgg.Cli.Tests/SalmonEgg.Cli.Tests.csproj | 2 +- tests/SalmonEgg.Domain.Tests/SalmonEgg.Domain.Tests.csproj | 2 +- tests/SalmonEgg.GuiTests.Windows/AssemblyInfo.cs | 5 +++-- .../SalmonEgg.GuiTests.Windows.csproj | 2 +- tests/SalmonEgg.Infrastructure.Tests/AssemblyInfo.cs | 5 +++-- .../SalmonEgg.Infrastructure.Tests.csproj | 2 +- .../SalmonEgg.Presentation.Core.Tests.csproj | 2 +- tests/SalmonEgg.Presentation.Core.Tests/TestAssembly.cs | 5 +++-- .../SalmonEgg.TerminalAuth.Windows.Tests.csproj | 2 +- 18 files changed, 26 insertions(+), 22 deletions(-) diff --git a/SalmonEgg/Directory.Packages.props b/SalmonEgg/Directory.Packages.props index 4603a9b9a..fa8fcab8a 100644 --- a/SalmonEgg/Directory.Packages.props +++ b/SalmonEgg/Directory.Packages.props @@ -14,7 +14,7 @@ - + diff --git a/src/SalmonEgg.Acp/SalmonEgg.Acp.csproj b/src/SalmonEgg.Acp/SalmonEgg.Acp.csproj index 349a66fcd..2e1d7f571 100644 --- a/src/SalmonEgg.Acp/SalmonEgg.Acp.csproj +++ b/src/SalmonEgg.Acp/SalmonEgg.Acp.csproj @@ -88,7 +88,7 @@ - + diff --git a/src/SalmonEgg.Cli/SalmonEgg.Cli.csproj b/src/SalmonEgg.Cli/SalmonEgg.Cli.csproj index 708cd8dff..dfeb2b7c0 100644 --- a/src/SalmonEgg.Cli/SalmonEgg.Cli.csproj +++ b/src/SalmonEgg.Cli/SalmonEgg.Cli.csproj @@ -65,7 +65,7 @@ - + diff --git a/src/SalmonEgg.Infrastructure.Desktop/SalmonEgg.Infrastructure.Desktop.csproj b/src/SalmonEgg.Infrastructure.Desktop/SalmonEgg.Infrastructure.Desktop.csproj index 9ae90cafc..97d4fccfc 100644 --- a/src/SalmonEgg.Infrastructure.Desktop/SalmonEgg.Infrastructure.Desktop.csproj +++ b/src/SalmonEgg.Infrastructure.Desktop/SalmonEgg.Infrastructure.Desktop.csproj @@ -7,7 +7,7 @@ - + diff --git a/src/SalmonEgg.Infrastructure/SalmonEgg.Infrastructure.csproj b/src/SalmonEgg.Infrastructure/SalmonEgg.Infrastructure.csproj index 544872034..7dfe59723 100644 --- a/src/SalmonEgg.Infrastructure/SalmonEgg.Infrastructure.csproj +++ b/src/SalmonEgg.Infrastructure/SalmonEgg.Infrastructure.csproj @@ -14,7 +14,7 @@ - + diff --git a/tests/SalmonEgg.Acp.Desktop.Tests/SalmonEgg.Acp.Desktop.Tests.csproj b/tests/SalmonEgg.Acp.Desktop.Tests/SalmonEgg.Acp.Desktop.Tests.csproj index 6bf1a4440..d90a37b8f 100644 --- a/tests/SalmonEgg.Acp.Desktop.Tests/SalmonEgg.Acp.Desktop.Tests.csproj +++ b/tests/SalmonEgg.Acp.Desktop.Tests/SalmonEgg.Acp.Desktop.Tests.csproj @@ -8,7 +8,7 @@ true - + diff --git a/tests/SalmonEgg.Acp.Tests/SalmonEgg.Acp.Tests.csproj b/tests/SalmonEgg.Acp.Tests/SalmonEgg.Acp.Tests.csproj index 0d43d37ec..5b410f3ec 100644 --- a/tests/SalmonEgg.Acp.Tests/SalmonEgg.Acp.Tests.csproj +++ b/tests/SalmonEgg.Acp.Tests/SalmonEgg.Acp.Tests.csproj @@ -18,7 +18,7 @@ - + diff --git a/tests/SalmonEgg.Application.Tests/SalmonEgg.Application.Tests.csproj b/tests/SalmonEgg.Application.Tests/SalmonEgg.Application.Tests.csproj index 475b2f165..40a10e18d 100644 --- a/tests/SalmonEgg.Application.Tests/SalmonEgg.Application.Tests.csproj +++ b/tests/SalmonEgg.Application.Tests/SalmonEgg.Application.Tests.csproj @@ -14,7 +14,7 @@ - + diff --git a/tests/SalmonEgg.Cli.Tests/AssemblyInfo.cs b/tests/SalmonEgg.Cli.Tests/AssemblyInfo.cs index de5dbb45e..8dd140476 100644 --- a/tests/SalmonEgg.Cli.Tests/AssemblyInfo.cs +++ b/tests/SalmonEgg.Cli.Tests/AssemblyInfo.cs @@ -1,6 +1,7 @@ -using Xunit; +using Xunit.Sdk; +using Xunit.v3; // Handler tests point SALMONEGG_APPDATA_ROOT at a per-test temp directory via a process-wide // environment variable, so two test classes running concurrently would read each other's config // root. Mirrors the same guard used by SalmonEgg.Infrastructure.Tests. -[assembly: CollectionBehavior(DisableTestParallelization = true)] +[assembly: Parallelization(Mode = ParallelMode.None)] diff --git a/tests/SalmonEgg.Cli.Tests/SalmonEgg.Cli.Tests.csproj b/tests/SalmonEgg.Cli.Tests/SalmonEgg.Cli.Tests.csproj index 6670e13da..d809fca89 100644 --- a/tests/SalmonEgg.Cli.Tests/SalmonEgg.Cli.Tests.csproj +++ b/tests/SalmonEgg.Cli.Tests/SalmonEgg.Cli.Tests.csproj @@ -11,7 +11,7 @@ - + diff --git a/tests/SalmonEgg.Domain.Tests/SalmonEgg.Domain.Tests.csproj b/tests/SalmonEgg.Domain.Tests/SalmonEgg.Domain.Tests.csproj index cb20250c5..4d34ce762 100644 --- a/tests/SalmonEgg.Domain.Tests/SalmonEgg.Domain.Tests.csproj +++ b/tests/SalmonEgg.Domain.Tests/SalmonEgg.Domain.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/tests/SalmonEgg.GuiTests.Windows/AssemblyInfo.cs b/tests/SalmonEgg.GuiTests.Windows/AssemblyInfo.cs index 217120083..61e212bf4 100644 --- a/tests/SalmonEgg.GuiTests.Windows/AssemblyInfo.cs +++ b/tests/SalmonEgg.GuiTests.Windows/AssemblyInfo.cs @@ -1,3 +1,4 @@ -using Xunit; +using Xunit.Sdk; +using Xunit.v3; -[assembly: CollectionBehavior(DisableTestParallelization = true)] +[assembly: Parallelization(Mode = ParallelMode.None)] diff --git a/tests/SalmonEgg.GuiTests.Windows/SalmonEgg.GuiTests.Windows.csproj b/tests/SalmonEgg.GuiTests.Windows/SalmonEgg.GuiTests.Windows.csproj index 19bab4802..9db1d8890 100644 --- a/tests/SalmonEgg.GuiTests.Windows/SalmonEgg.GuiTests.Windows.csproj +++ b/tests/SalmonEgg.GuiTests.Windows/SalmonEgg.GuiTests.Windows.csproj @@ -11,7 +11,7 @@ - + diff --git a/tests/SalmonEgg.Infrastructure.Tests/AssemblyInfo.cs b/tests/SalmonEgg.Infrastructure.Tests/AssemblyInfo.cs index a0f515f5b..742cbc99e 100644 --- a/tests/SalmonEgg.Infrastructure.Tests/AssemblyInfo.cs +++ b/tests/SalmonEgg.Infrastructure.Tests/AssemblyInfo.cs @@ -1,4 +1,5 @@ -using Xunit; +using Xunit.Sdk; +using Xunit.v3; -[assembly: CollectionBehavior(DisableTestParallelization = true)] +[assembly: Parallelization(Mode = ParallelMode.None)] diff --git a/tests/SalmonEgg.Infrastructure.Tests/SalmonEgg.Infrastructure.Tests.csproj b/tests/SalmonEgg.Infrastructure.Tests/SalmonEgg.Infrastructure.Tests.csproj index 50c415a54..18bf656e1 100644 --- a/tests/SalmonEgg.Infrastructure.Tests/SalmonEgg.Infrastructure.Tests.csproj +++ b/tests/SalmonEgg.Infrastructure.Tests/SalmonEgg.Infrastructure.Tests.csproj @@ -12,7 +12,7 @@ - + diff --git a/tests/SalmonEgg.Presentation.Core.Tests/SalmonEgg.Presentation.Core.Tests.csproj b/tests/SalmonEgg.Presentation.Core.Tests/SalmonEgg.Presentation.Core.Tests.csproj index c58e301a7..2d6f173b1 100644 --- a/tests/SalmonEgg.Presentation.Core.Tests/SalmonEgg.Presentation.Core.Tests.csproj +++ b/tests/SalmonEgg.Presentation.Core.Tests/SalmonEgg.Presentation.Core.Tests.csproj @@ -11,7 +11,7 @@ - + diff --git a/tests/SalmonEgg.Presentation.Core.Tests/TestAssembly.cs b/tests/SalmonEgg.Presentation.Core.Tests/TestAssembly.cs index 8103446de..85a8f47af 100644 --- a/tests/SalmonEgg.Presentation.Core.Tests/TestAssembly.cs +++ b/tests/SalmonEgg.Presentation.Core.Tests/TestAssembly.cs @@ -1,3 +1,4 @@ -using Xunit; +using Xunit.Sdk; +using Xunit.v3; -[assembly: CollectionBehavior(DisableTestParallelization = true, MaxParallelThreads = 1)] +[assembly: Parallelization(Mode = ParallelMode.None, MaxThreads = 1)] diff --git a/tests/SalmonEgg.TerminalAuth.Windows.Tests/SalmonEgg.TerminalAuth.Windows.Tests.csproj b/tests/SalmonEgg.TerminalAuth.Windows.Tests/SalmonEgg.TerminalAuth.Windows.Tests.csproj index 24f895333..f5c6e1f4b 100644 --- a/tests/SalmonEgg.TerminalAuth.Windows.Tests/SalmonEgg.TerminalAuth.Windows.Tests.csproj +++ b/tests/SalmonEgg.TerminalAuth.Windows.Tests/SalmonEgg.TerminalAuth.Windows.Tests.csproj @@ -9,7 +9,7 @@ true - + From ef9c723281b8f599c15c6f2aaff87479ee8623de Mon Sep 17 00:00:00 2001 From: Shangxin Date: Thu, 17 Sep 2026 14:06:40 +0000 Subject: [PATCH 2/2] test(winui): locate close button from dialog children and relax runner timeouts - Prioritize FindFirstChild for CloseButton on dialog scope to avoid recursing into active WebView2 subtree during cancellation output - Relax FindNativeElement and ClickNamedButton timeouts from 20s to 35s for cold starts on 2-vCPU Windows runners - Adjust cancellation streaming sleep interval from 100ms to 250ms to prevent runner CPU saturation --- .../Fixtures/PackagedTerminalAuthAgent.ps1 | 2 +- .../TerminalAuthenticationSmokeTests.cs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/SalmonEgg.GuiTests.Windows/Fixtures/PackagedTerminalAuthAgent.ps1 b/tests/SalmonEgg.GuiTests.Windows/Fixtures/PackagedTerminalAuthAgent.ps1 index edf0d84f9..0090408d2 100644 --- a/tests/SalmonEgg.GuiTests.Windows/Fixtures/PackagedTerminalAuthAgent.ps1 +++ b/tests/SalmonEgg.GuiTests.Windows/Fixtures/PackagedTerminalAuthAgent.ps1 @@ -31,7 +31,7 @@ if ($Mode -eq 'login') { [IO.File]::WriteAllText((Join-Path $StateDirectory 'login.json'), ($observed | ConvertTo-Json -Compress)) [Console]::WriteLine('PACKAGED_TERMINAL_READY') if ($behavior -eq 'cancel') { - while ($true) { [Console]::WriteLine('terminal cancellation output'); Start-Sleep -Milliseconds 100 } + while ($true) { [Console]::WriteLine('terminal cancellation output'); Start-Sleep -Milliseconds 250 } } $inputLine = [Console]::ReadLine() $inputPath = Join-Path $StateDirectory 'login-input.json' diff --git a/tests/SalmonEgg.GuiTests.Windows/TerminalAuthenticationSmokeTests.cs b/tests/SalmonEgg.GuiTests.Windows/TerminalAuthenticationSmokeTests.cs index d2d941b36..822afe582 100644 --- a/tests/SalmonEgg.GuiTests.Windows/TerminalAuthenticationSmokeTests.cs +++ b/tests/SalmonEgg.GuiTests.Windows/TerminalAuthenticationSmokeTests.cs @@ -101,13 +101,14 @@ private static void ClickNamedButton(WindowsGuiAppSession app, string text, stri if (scope is null) return false; button = dialogId is null ? scope.FindFirstDescendant(cf => cf.ByControlType(ControlType.Button).And(cf.ByName(text))) - : scope.FindFirstDescendant(cf => cf.ByAutomationId("CloseButton")); + : (scope.FindFirstChild(cf => cf.ByAutomationId("CloseButton")) + ?? scope.FindFirstDescendant(cf => cf.ByAutomationId("CloseButton"))); if (button is not null && button.Properties.Name.ValueOrDefault != text) return false; return button is not null && button.Properties.IsEnabled.ValueOrDefault && !button.Properties.IsOffscreen.ValueOrDefault; } catch (System.Runtime.InteropServices.COMException) { return false; } - }, TimeSpan.FromSeconds(20)); + }, TimeSpan.FromSeconds(35)); if (!ready) app.CaptureAcceptanceFailure("terminal-button-missing"); Assert.True(ready, $"The enabled native terminal button '{text}' did not appear."); app.ClickElement(button!); @@ -138,7 +139,7 @@ private static AutomationElement FindNativeElement(WindowsGuiAppSession app, Fun // A stale snapshot is not a match; the bounded next poll must find the real control. return false; } - }, TimeSpan.FromSeconds(20)); + }, TimeSpan.FromSeconds(35)); if (!ready) app.CaptureAcceptanceFailure("terminal-control-missing"); Assert.True(ready, "The requested native terminal element did not appear."); return found!;