Sequential integration tests fail with ObjectDisposedException: IServiceProvider after upgrading Umbraco 13.4 → 13.16 (pass when run individually)

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
  • UmbracoIntegrationTest
  • NewSchemaPerTest

Question

  1. Did something change in Umbraco test host / DI between 13.4 and 13.16 that causes this?
  2. For tests, should we always inject IPublishedUrlProvider instead of using ambient content.Url()?
  3. Has anyone else seen tests pass alone but fail in a full sequential run after upgrading to 13.16?