Skip to content

Integration Tests: Avoid hidden BootFailedException in CoreConfigurationHttpTests#22188

Merged
AndyButland merged 1 commit into
mainfrom
v17/bugfix/avoid-hidden-exception-in-http-composition-tests
Mar 20, 2026
Merged

Integration Tests: Avoid hidden BootFailedException in CoreConfigurationHttpTests#22188
AndyButland merged 1 commit into
mainfrom
v17/bugfix/avoid-hidden-exception-in-http-composition-tests

Conversation

@AndyButland

@AndyButland AndyButland commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Description

This PR set ModelsBuilder:ModelsMode to Nothing in CoreConfigurationHttpTests to prevent a hidden BootFailedException (InMemoryAuto requires the Umbraco.Cms.DevelopmentMode.Backoffice package) that was being silently swallowed during test execution.

We found this in resolving a visible issue for when upgrading NUnit in #22155 for 18.

When the BootFailedException fires during CoreRuntime.StartAsync(), the runtime catches it internally and sets the runtime level to BootFailed. The BootFailedMiddleware then intercepts all incoming HTTP requests and returns a 404 response. Since a 404 is still a non-null HttpResponseMessage, the assertion passes.

So the tests were "passing" but not really validating what they intended — that Umbraco boots successfully with each configuration. They were just confirming that the boot-failure error page is served.

Testing

The build checks will confirm that the tests in CoreConfigurationHttpTests continue to pass.

Copilot AI review requested due to automatic review settings March 19, 2026 10:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the integration test host configuration to prevent a BootFailedException from being triggered (and potentially swallowed) during CoreConfigurationHttpTests execution by disabling ModelsBuilder for these boot-scenario HTTP tests.

Changes:

  • Set Umbraco:CMS:ModelsBuilder:ModelsMode to Nothing in CoreConfigurationHttpTests test host setup.
  • Add an explanatory comment linking the setting to the BootFailedException scenario.

You can also share your feedback on Copilot code review. Take the survey.

@AndyButland AndyButland changed the title QA: Avoid hidden BootFailedException in CoreConfigurationHttpTests Integration Tests: Avoid hidden BootFailedException in CoreConfigurationHttpTests Mar 19, 2026
@AndyButland AndyButland changed the title Integration Tests: Avoid hidden BootFailedException in CoreConfigurationHttpTests Integration Tests: Avoid hidden BootFailedException in CoreConfigurationHttpTests Mar 19, 2026

@NguyenThuyLan NguyenThuyLan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good to me!

@AndyButland AndyButland merged commit e28de80 into main Mar 20, 2026
32 checks passed
@AndyButland AndyButland deleted the v17/bugfix/avoid-hidden-exception-in-http-composition-tests branch March 20, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants