test: lane the one Avalonia test that needs a real desktop session
MainWindowViewTests.CompiledMarkupAndEveryModalFocusPathRunInOneOwnedAvalonia Session is Lane=Manual. Measured across five environments on 2026-08-19: dev desktop PASS CI Windows box, over SSH PASS Windows under act_runner FAIL Linux, plain SSH FAIL Always the same shape — Test Case Cleanup, 'The calling thread cannot access this object', while a compositor is being CONSTRUCTED (Compositor..ctor -> DefaultRenderLoop.Add -> VerifyAccess). Two hypotheses were tested and disproved rather than assumed: serializing the assembly (first xunit.runner.json, then a compiled-in CollectionBehavior attribute, so delivery could not be the excuse) did not fix it, and removing the test's only await did not either — that attempt actively CAUSED the failure locally and was reverted. So it is neither parallelism nor a thread hop in the test body; it is Avalonia's headless session lifecycle without a desktop. The test is not weakened or deleted: the gate now runs 55/55 and this one runs on demand via --filter Lane=Manual, where it passes. That matches how the InstalledDat and Live lanes already work.
This commit is contained in:
parent
45f88d2d18
commit
311c8bd3df
1 changed files with 13 additions and 0 deletions
|
|
@ -48,7 +48,20 @@ public sealed class MainWindowViewTests
|
|||
("UpdateCloseButton", typeof(Button)),
|
||||
];
|
||||
|
||||
// Lane=Manual: this is the ONE test in the repo that needs a real desktop
|
||||
// session. Measured 2026-08-19 across five environments — passes on a dev
|
||||
// desktop and on the CI Windows box over SSH; fails identically under
|
||||
// act_runner's step context and on Linux, always in Test Case Cleanup with
|
||||
// "The calling thread cannot access this object" while a compositor is
|
||||
// being CONSTRUCTED (Compositor..ctor -> DefaultRenderLoop.Add ->
|
||||
// VerifyAccess). Neither serializing the assembly (xunit.runner.json, then
|
||||
// a compiled-in CollectionBehavior attribute) nor removing the test's only
|
||||
// await changed it, so it is not parallelism and not a thread hop in the
|
||||
// test body — it is Avalonia's headless session lifecycle in a
|
||||
// desktop-less environment. Run it deliberately:
|
||||
// dotnet test tests/AcDream.Launcher.Tests --filter Lane=Manual
|
||||
[AvaloniaFact]
|
||||
[Trait("Lane", "Manual")]
|
||||
public async Task CompiledMarkupAndEveryModalFocusPathRunInOneOwnedAvaloniaSession()
|
||||
{
|
||||
// Avalonia's headless compositor is thread-affine. Keep the complete
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue