Integration Tests: Avoid hidden BootFailedException in CoreConfigurationHttpTests#22188
Merged
AndyButland merged 1 commit intoMar 20, 2026
Conversation
Contributor
There was a problem hiding this comment.
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:ModelsModetoNothinginCoreConfigurationHttpTeststest host setup. - Add an explanatory comment linking the setting to the
BootFailedExceptionscenario.
You can also share your feedback on Copilot code review. Take the survey.
BootFailedException in CoreConfigurationHttpTests
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 set
ModelsBuilder:ModelsModetoNothinginCoreConfigurationHttpTeststo prevent a hiddenBootFailedException(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
BootFailedExceptionfires duringCoreRuntime.StartAsync(), the runtime catches it internally and sets the runtime level to BootFailed. TheBootFailedMiddlewarethen intercepts all incoming HTTP requests and returns a 404 response. Since a 404 is still a non-nullHttpResponseMessage, 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
CoreConfigurationHttpTestscontinue to pass.