Skip to content

Commit 3e3be2b

Browse files
committed
Polish
1 parent 9a1ca2f commit 3e3be2b

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/reactive/ReactiveManagementChildContextConfigurationTests.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,19 @@ void accessLogCustomizerWithNullPrefix() {
5151
@Test
5252
// gh-45857
5353
void failsWithoutManagementServerPropertiesBeanFromParent() {
54-
new ReactiveWebApplicationContextRunner().run((parent) -> {
55-
new ReactiveWebApplicationContextRunner().withParent(parent)
54+
new ReactiveWebApplicationContextRunner()
55+
.run((parent) -> new ReactiveWebApplicationContextRunner().withParent(parent)
5656
.withUserConfiguration(ReactiveManagementChildContextConfiguration.class)
57-
.run((context) -> assertThat(context).hasFailed());
58-
});
57+
.run((context) -> assertThat(context).hasFailed()));
5958
}
6059

6160
@Test
6261
// gh-45857
6362
void succeedsWithManagementServerPropertiesBeanFromParent() {
64-
new ReactiveWebApplicationContextRunner().withBean(ManagementServerProperties.class).run((parent) -> {
65-
new ReactiveWebApplicationContextRunner().withParent(parent)
63+
new ReactiveWebApplicationContextRunner().withBean(ManagementServerProperties.class)
64+
.run((parent) -> new ReactiveWebApplicationContextRunner().withParent(parent)
6665
.withUserConfiguration(ReactiveManagementChildContextConfiguration.class)
67-
.run((context) -> assertThat(context).hasNotFailed());
68-
});
66+
.run((context) -> assertThat(context).hasNotFailed()));
6967
}
7068

7169
}

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/servlet/ServletManagementChildContextConfigurationTests.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,18 @@ void accessLogCustomizerWithNullPrefix() {
5151
@Test
5252
// gh-45857
5353
void failsWithoutManagementServerPropertiesBeanFromParent() {
54-
new WebApplicationContextRunner().run((parent) -> {
55-
new WebApplicationContextRunner().withParent(parent)
56-
.withUserConfiguration(ServletManagementChildContextConfiguration.class)
57-
.run((context) -> assertThat(context).hasFailed());
58-
});
54+
new WebApplicationContextRunner().run((parent) -> new WebApplicationContextRunner().withParent(parent)
55+
.withUserConfiguration(ServletManagementChildContextConfiguration.class)
56+
.run((context) -> assertThat(context).hasFailed()));
5957
}
6058

6159
@Test
6260
// gh-45857
6361
void succeedsWithManagementServerPropertiesBeanFromParent() {
64-
new WebApplicationContextRunner().withBean(ManagementServerProperties.class).run((parent) -> {
65-
new WebApplicationContextRunner().withParent(parent)
62+
new WebApplicationContextRunner().withBean(ManagementServerProperties.class)
63+
.run((parent) -> new WebApplicationContextRunner().withParent(parent)
6664
.withUserConfiguration(ServletManagementChildContextConfiguration.class)
67-
.run((context) -> assertThat(context).hasNotFailed());
68-
});
65+
.run((context) -> assertThat(context).hasNotFailed()));
6966
}
7067

7168
}

0 commit comments

Comments
 (0)