-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add DI specification test for ensuring externally provided instance services are not disposed on provider disposal. #104853
Conversation
…ervices are not disposed when the provider is disposed.
Looks like the external container tests are failing, which they will until we fix the behaviour I'm testing for in Autofac! What's the approach here, fix Autofac before merging, and update the external tests project? Or mark the new test as skipped for Autofac to get this merged? |
It depends on timing. If the Autofac fix is coming soon, I'd wait and then update the version in the
If it will be a while, then use
on the test. |
We'll get an Autofac release out with the fix first; shouldn't be long. |
@steveharter, the updated package is up, 10.0.0, and I've updated the project. Some of the checks claim not to be able to find the new version though. Anything needs to be updated or cache flushed? |
@alistairjevans can you sync with main please. Autofac was updated to 10 recently here: #107639. Thanks |
# Conflicts: # src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj
Note after the recent merge from |
@alistairjevans the new test is failing; the service is being disposed. From the issue:
However from the docs is states that registered singletons are disposed:
|
This pull request has been automatically marked |
This pull request will now be closed since it had been marked |
Fixes #102651