@ -74,7 +74,7 @@ class DataSourceHealthContributorAutoConfigurationTests {
@Test
void runWithRoutingAndEmbeddedDataSourceShouldIncludeRoutingDataSource ( ) {
this . contextRunner . withUserConfiguration ( EmbeddedDataSourceConfiguration . class , RoutingData s ourceConfig. class )
this . contextRunner . withUserConfiguration ( EmbeddedDataSourceConfiguration . class , RoutingData S ourceConfig. class )
. run ( ( context ) - > {
CompositeHealthContributor composite = context . getBean ( CompositeHealthContributor . class ) ;
assertThat ( composite . getContributor ( "dataSource" ) ) . isInstanceOf ( DataSourceHealthIndicator . class ) ;
@ -85,7 +85,7 @@ class DataSourceHealthContributorAutoConfigurationTests {
@Test
void runWithRoutingAndEmbeddedDataSourceShouldNotIncludeRoutingDataSourceWhenIgnored ( ) {
this . contextRunner . withUserConfiguration ( EmbeddedDataSourceConfiguration . class , RoutingData s ourceConfig. class )
this . contextRunner . withUserConfiguration ( EmbeddedDataSourceConfiguration . class , RoutingData S ourceConfig. class )
. withPropertyValues ( "management.health.db.ignore-routing-datasources:true" ) . run ( ( context ) - > {
assertThat ( context ) . doesNotHaveBean ( CompositeHealthContributor . class ) ;
assertThat ( context ) . hasSingleBean ( DataSourceHealthIndicator . class ) ;
@ -95,13 +95,13 @@ class DataSourceHealthContributorAutoConfigurationTests {
@Test
void runWithOnlyRoutingDataSourceShouldIncludeRoutingDataSource ( ) {
this . contextRunner . withUserConfiguration ( RoutingData s ourceConfig. class )
this . contextRunner . withUserConfiguration ( RoutingData S ourceConfig. class )
. run ( ( context ) - > assertThat ( context ) . hasSingleBean ( RoutingDataSourceHealthIndicator . class ) ) ;
}
@Test
void runWithOnlyRoutingDataSourceShouldCrashWhenIgnored ( ) {
this . contextRunner . withUserConfiguration ( RoutingData s ourceConfig. class )
this . contextRunner . withUserConfiguration ( RoutingData S ourceConfig. class )
. withPropertyValues ( "management.health.db.ignore-routing-datasources:true" )
. run ( ( context ) - > assertThat ( context ) . hasFailed ( ) . getFailure ( )
. hasRootCauseInstanceOf ( IllegalArgumentException . class ) ) ;
@ -140,7 +140,7 @@ class DataSourceHealthContributorAutoConfigurationTests {
}
@Configuration ( proxyBeanMethods = false )
static class RoutingData s ourceConfig {
static class RoutingData S ourceConfig {
@Bean
AbstractRoutingDataSource routingDataSource ( ) {