Merge branch 'main' into 4.0.x

This commit is contained in:
Andy Wilkinson
2025-06-10 11:07:49 +01:00
2 changed files with 12 additions and 17 deletions

View File

@@ -51,21 +51,19 @@ class ReactiveManagementChildContextConfigurationTests {
@Test
// gh-45857
void failsWithoutManagementServerPropertiesBeanFromParent() {
new ReactiveWebApplicationContextRunner().run((parent) -> {
new ReactiveWebApplicationContextRunner().withParent(parent)
new ReactiveWebApplicationContextRunner()
.run((parent) -> new ReactiveWebApplicationContextRunner().withParent(parent)
.withUserConfiguration(ReactiveManagementChildContextConfiguration.class)
.run((context) -> assertThat(context).hasFailed());
});
.run((context) -> assertThat(context).hasFailed()));
}
@Test
// gh-45857
void succeedsWithManagementServerPropertiesBeanFromParent() {
new ReactiveWebApplicationContextRunner().withBean(ManagementServerProperties.class).run((parent) -> {
new ReactiveWebApplicationContextRunner().withParent(parent)
new ReactiveWebApplicationContextRunner().withBean(ManagementServerProperties.class)
.run((parent) -> new ReactiveWebApplicationContextRunner().withParent(parent)
.withUserConfiguration(ReactiveManagementChildContextConfiguration.class)
.run((context) -> assertThat(context).hasNotFailed());
});
.run((context) -> assertThat(context).hasNotFailed()));
}
}

View File

@@ -51,21 +51,18 @@ class ServletManagementChildContextConfigurationTests {
@Test
// gh-45857
void failsWithoutManagementServerPropertiesBeanFromParent() {
new WebApplicationContextRunner().run((parent) -> {
new WebApplicationContextRunner().withParent(parent)
.withUserConfiguration(ServletManagementChildContextConfiguration.class)
.run((context) -> assertThat(context).hasFailed());
});
new WebApplicationContextRunner().run((parent) -> new WebApplicationContextRunner().withParent(parent)
.withUserConfiguration(ServletManagementChildContextConfiguration.class)
.run((context) -> assertThat(context).hasFailed()));
}
@Test
// gh-45857
void succeedsWithManagementServerPropertiesBeanFromParent() {
new WebApplicationContextRunner().withBean(ManagementServerProperties.class).run((parent) -> {
new WebApplicationContextRunner().withParent(parent)
new WebApplicationContextRunner().withBean(ManagementServerProperties.class)
.run((parent) -> new WebApplicationContextRunner().withParent(parent)
.withUserConfiguration(ServletManagementChildContextConfiguration.class)
.run((context) -> assertThat(context).hasNotFailed());
});
.run((context) -> assertThat(context).hasNotFailed()));
}
}