We only updated NuGet packages from Umbraco 13.4 to 13.16.
After that:
- Running one test alone usually works
- Running all tests together fails
Same tests worked fine on 13.4.
Error
ObjectDisposedException: Cannot access a disposed object.
Object name: ‘IServiceProvider’.
Sometimes we also see:
SQLite Error 1: ‘no such table: umbracoLanguage’
This often happens when code builds a URL with content.Url() without injecting IPublishedUrlProvider.
Setup
- Umbraco 13.16
- .NET 8
- NUnit
UmbracoIntegrationTestNewSchemaPerTest
Question
- Did something change in Umbraco test host / DI between 13.4 and 13.16 that causes this?
- For tests, should we always inject
IPublishedUrlProviderinstead of using ambientcontent.Url()? - Has anyone else seen tests pass alone but fail in a full sequential run after upgrading to 13.16?