Repository navigation
Fix the theme-test race behind last night's CI failure on main - #22
Merged
Merged
Conversation
Theme_variant_matches_the_saved_setting read AppSettings.Load() while AppSettingsTests — running in a parallel xUnit collection — had the static BaseDirOverride pointed at a sandbox with Theme=Midnight, so the test intermittently expected Dark against a Light window. Now hermetic (its own sandboxed settings, asserting both variants), and the assembly disables test parallelization outright: these tests share Application.Current and the static override, so parallel collections were never sound. App suite verified 10/10 consecutive green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
Run failed: CI - main (bb17a15)email was a test-suite race, not a product bug — nothing about v2.0.0 or the dependency bumps is broken.Mechanism:
SmokeTests.Theme_variant_matches_the_saved_settingcompared the process-global theme variant againstAppSettings.Load().AppSettings.BaseDirOverrideis a static test seam, and theAppSettingsTestsfixtures (plain[Fact]s that xUnit runs in a parallel collection) point it at a sandbox where they saveTheme = "Midnight". When the theme test'sLoad()landed inside that window it expected Dark against a Light window. Timing-dependent — it passed on every prior run and flaked on the #21 merge push.Fix:
[assembly: CollectionBehavior(DisableTestParallelization = true)]for the App test assembly — these tests shareApplication.Currentand the static override, so parallel collections were never sound. The suite runs in ~1 s; serialization costs nothing.Verification: full App suite run 10/10 consecutive green locally; the failed main run has been re-run and should clear.
🤖 Generated with Claude Code