mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish "Correct Mono import in LegacyHealthEndpointCompatibilityConfiguration"
See gh-18571
This commit is contained in:
parent
35dc4817dd
commit
cf62dc862b
@ -44,6 +44,7 @@ import org.springframework.boot.actuate.health.NamedContributor;
|
||||
import org.springframework.boot.actuate.health.ReactiveHealthContributorRegistry;
|
||||
import org.springframework.boot.actuate.health.ReactiveHealthEndpointWebExtension;
|
||||
import org.springframework.boot.actuate.health.ReactiveHealthIndicator;
|
||||
import org.springframework.boot.actuate.health.ReactiveHealthIndicatorRegistry;
|
||||
import org.springframework.boot.actuate.health.Status;
|
||||
import org.springframework.boot.actuate.health.StatusAggregator;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
@ -294,10 +295,15 @@ class HealthEndpointAutoConfigurationTests {
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void runWhenReactorAvailableCreatesReactiveHealthIndicatorRegistryBean() {
|
||||
this.contextRunner.run((context) -> assertThat(context).hasSingleBean(ReactiveHealthIndicatorRegistry.class));
|
||||
}
|
||||
|
||||
@Test // gh-18570
|
||||
void runDoesNotFailWithoutReactorOnClasspath() {
|
||||
void runWhenReactorUnavailableDoesNotCreateReactiveHealthIndicatorRegistryBean() {
|
||||
this.contextRunner.withClassLoader(new FilteredClassLoader(Mono.class.getPackage().getName()))
|
||||
.run((context) -> assertThat(context).hasNotFailed());
|
||||
.run((context) -> assertThat(context).doesNotHaveBean(ReactiveHealthIndicatorRegistry.class));
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
|
@ -13,7 +13,7 @@
|
||||
name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck">
|
||||
<property name="regexp" value="true" />
|
||||
<property name="illegalPkgs"
|
||||
value="^sun.*, ^org\.apache\.commons\.(?!compress|dbcp2|lang|lang3|logging|pool2).*, ^com\.google\.common.*, ^org\.flywaydb\.core\.internal.*, ^org\.testcontainers\.shaded.*" />
|
||||
value="^sun.*, ^org\.apache\.commons\.(?!compress|dbcp2|lang|lang3|logging|pool2).*, ^com\.google\.common.*, ^io\.micrometer\.shaded.*, ^org\.flywaydb\.core\.internal.*, ^org\.testcontainers\.shaded.*" />
|
||||
<property name="illegalClasses"
|
||||
value="^com\.hazelcast\.util\.Base64, ^org\.junit\.rules\.ExpectedException, ^org\.mockito\.InjectMocks, ^org\.slf4j\.LoggerFactory, ^reactor\.core\.support\.Assert" />
|
||||
</module>
|
||||
|
Loading…
Reference in New Issue
Block a user