Fix flaky InstallerFunctionalTests::RunInstallerAndVerifyPackages: retry package removal#6474
Merged
v-arlysenko merged 2 commits intoMay 14, 2026
Conversation
…n setup failure - Add retry logic (3 attempts, 1s delay) to RemovePackage() for transient 'package in use' errors - Add VerifyAllPackagesRemoved() to detect when removal silently fails - MethodInit now blocks the test with a clear setup error message instead of letting it proceed and fail misleadingly - MethodUninit logs a warning on incomplete cleanup Fixes AB#61461238
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Scottj1s
approved these changes
May 13, 2026
v-arlysenko
deleted the
user/v-arlysenko/installer-test-retry-package-removal
branch
May 14, 2026 14:50
7 tasks
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.
Replaces #6467 (recreated from an upstream branch instead of a fork now that I have contributor access).
Summary
Fixes flaky
InstallerFunctionalTests::RunInstallerAndVerifyPackages(AB#61461238) by retryingRemove-AppxPackageduring test setup and failing fast when setup cannot reach a clean state.Root cause
The test removes the previously-installed WinAppSDK package before each run.
Remove-AppxPackageis asynchronous in the deployment service and occasionally still has the package registered when the test moves on to reinstall it, causing intermittent failures.Fix
Validation
Ran the test locally in a loop (50 iterations) — no failures.
Risk
Low — limited to test-only code (
installer/test/InstallerFunctionalTests/).