Repository navigation
Various reliability fixes (mostly in tests) - #1756
Merged
Merged
Conversation
Contributor
Summary - All Code Coverage (ubuntu-latest)
|
bart-vmware
marked this pull request as ready for review
October 9, 2026 15:33
TimHess
reviewed
Oct 9, 2026
TimHess
approved these changes
Oct 9, 2026
TimHess
left a comment
Member
There was a problem hiding this comment.
Thanks for chasing down these resource links, LGTM
- Add_AddsTimer: Ensure the inner PeriodicTimer is disposed - Timer_CallsPassTTL: Switch from waiting to signaling
…Message/PhysicalFileProvider/ServiceProvider/DbCommand
…tion providers containing file watchers
…itProperties.Build
bart-vmware
force-pushed
the
reliability-fixes
branch
from
October 9, 2026 19:47
edaa0ed to
706dbdd
Compare
Member
Author
|
I had to rebase, nothing changed since approval. |
TimHess
approved these changes
Oct 9, 2026
|
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.



Description
This PR fixes leaked resources, such as proper disposal of configuration providers with file system watchers attached, as well as disposing objects related to
HttpClientusage. It affects tests for the most part, but also includes a few Steeltoe fixes. Another notable pattern in tests is where a host builder is created, but never built or started, resulting in their resources inIConfigurationnever getting disposed.Before review, start by reading the new pattern in
ConfigurationBuilderExtensions(in theTestResourcesproject):Why?
IConfigurationRootis not disposable, which is why theBuildAsRootextension method is being introduced: it allows to track all usages and the callers don't need to cast toConfigurationRoot(which is disposable).Taking a lambda in
AddSingletonensures ownership is taken, which is not the case when passing an instance directly.Additionally, see the commit messages for details.
Quality checklist
If your change affects other repositories, such as Documentation and/or Samples, add linked PRs here.