Skip to content

Fix atrophied functional tests (repair, mount, shared cache)#1999

Closed
tyrielv wants to merge 4 commits into
microsoft:masterfrom
tyrielv:tyrielv/fix-atrophied-tests
Closed

Fix atrophied functional tests (repair, mount, shared cache)#1999
tyrielv wants to merge 4 commits into
microsoft:masterfrom
tyrielv:tyrielv/fix-atrophied-tests

Conversation

@tyrielv
Copy link
Copy Markdown
Contributor

@tyrielv tyrielv commented Jun 2, 2026

Summary

Fixes atrophied functional tests surfaced by removing ExtraCoverage (#1997). Includes all commits from that PR plus these fixes.

Fixed tests (now run in CI)

RepairTests (3 tests)

GVFS now tolerates corrupt git index on mount (rebuilds from projection), so the old mount-should-fail precondition was stale. Updated tests to verify repair restores the index file without asserting mount failure.

SharedCacheTests.RepairFixesCorruptBlobSizesDatabase

Same pattern — removed stale mount-fail assertion, kept repair verification.

MountTests (2 removed)

  • ProjFS_CMDHangNoneActiveInstance: ProjFS regression test, no longer relevant
  • MountingARepositoryThatRequiresPlaceholderUpdatesWorks: placeholder update flow moved out of mount

Still SkipInCI (follow-up work)

Class Tests Why
DehydrateTests 8 Folder dehydrate behavior changed substantially
WindowsDiskLayoutUpgradeTests 2 Expected path/placeholder counts drifted
LooseObjectStepTests 3 Pre-existing flaky
PrefetchVerbTests 2 Pre-existing flaky

tyrielv added 4 commits June 2, 2026 11:55
The ExtraCoverage category excluded ~110 functional test methods (19 test
classes) from the default test run and CI pipeline. These tests cover
critical functionality — mount/unmount edge cases, dehydrate, repair,
shared cache, disk layout upgrades, junctions, and more — but were never
run in CI validation, only via the --extra-only flag.

Remove the ExtraCoverage filtering so all functional tests run in the
default pass, which is what CI already uses (sliced across 10 parallel
jobs with 60-minute timeouts). This eliminates the risk of these tests
silently atrophying.

Changes:
- Remove [Category(Categories.ExtraCoverage)] from all 18 test classes
  and 1 test method
- Remove ExtraCoverage constant from Categories.cs
- Remove --extra-only flag handling from Program.cs
- Delete SharedCacheUpgradeTests.cs (zero test methods — dead code)
- Update AuthoringTests.md to reflect the new default behavior

Assisted-by: Claude Opus 4.6
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
Address the ~33 test failures surfaced by removing ExtraCoverage:

FastFetch tests (15): Download the FastFetch artifact into the
functional test directory in CI so FastFetch.exe is available.

ConfigVerbTests (2): Extend NUnitRunner's slice grouping regex to
include MultiEnlistmentTests alongside EnlistmentPerFixture, so
Order-dependent tests within a class stay in the same slice.

UpgradeReminderTests (3): Delete — tests the old NuGet-based upgrade
reminder system which has been removed from the service.

Atrophied tests (28): Mark with NeedsReactionInCI — these tests have
stale expectations due to behavioral changes in mount, dehydrate,
repair, disk layout upgrades, and shared cache. They need updated
expectations in follow-up PRs:
- MountTests (11 methods): mount error handling changed
- DehydrateTests (8 methods): folder dehydrate behavior changed
- RepairTests (3 methods): GVFS now tolerates corrupt git index
- WindowsDiskLayoutUpgradeTests (2 methods): expected paths drifted
- SharedCacheTests (1 method): mount after repair behavior changed

Assisted-by: Claude Opus 4.6
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
Introduce SkipInCIAttribute — a custom NUnit CategoryAttribute that
accepts a reason string, making it clear why each test is skipped and
what needs fixing. Replace all NeedsReactionInCI usages (both new
atrophied tests and pre-existing flaky tests) with descriptive
SkipInCI annotations.

Assisted-by: Claude Opus 4.6
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
RepairTests: GVFS now tolerates corrupt git index on mount (rebuilds
from projection), so the mount-fail precondition is stale. Update the
three corrupt-index tests to verify that repair restores the index
file without asserting mount failure beforehand.

SharedCacheTests.RepairFixesCorruptBlobSizesDatabase: Same pattern —
GVFS now tolerates corrupt blob sizes DB. Remove mount-fail assertion,
keep repair verification.

MountTests: Remove two obsolete tests:
- ProjFS_CMDHangNoneActiveInstance: ProjFS regression test no longer
  relevant to GVFS mount behavior
- MountingARepositoryThatRequiresPlaceholderUpdatesWorks: placeholder
  update flow moved out of mount startup

Assisted-by: Claude Opus 4.6
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
@tyrielv
Copy link
Copy Markdown
Contributor Author

tyrielv commented Jun 2, 2026

Consolidated into #1997

@tyrielv tyrielv closed this Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant