Merge remote-tracking branch 'origin/2.2.x'
# Conflicts: # docs/pom.xml # pom.xml # spring-cloud-commons-dependencies/pom.xml # spring-cloud-commons/pom.xml # spring-cloud-context-integration-tests/pom.xml # spring-cloud-context-webflux-integration-tests/pom.xml # spring-cloud-context/pom.xml # spring-cloud-loadbalancer/pom.xml # spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/annotation/LoadBalancerClientConfiguration.java # spring-cloud-loadbalancer/src/test/java/org/springframework/cloud/loadbalancer/annotation/LoadBalancerClientConfigurationTests.java # spring-cloud-starter-loadbalancer/pom.xml # spring-cloud-starter/pom.xml # spring-cloud-test-support/pom.xml
This commit is contained in:
@@ -95,8 +95,7 @@ public class LoadBalancerClientConfiguration {
|
||||
@ConditionalOnProperty(value = "spring.cloud.loadbalancer.configurations", havingValue = "health-check")
|
||||
public ServiceInstanceListSupplier healthCheckDiscoveryClientServiceInstanceListSupplier(
|
||||
ConfigurableApplicationContext context) {
|
||||
return ServiceInstanceListSupplier.builder().withDiscoveryClient().withHealthChecks().withCaching()
|
||||
.build(context);
|
||||
return ServiceInstanceListSupplier.builder().withDiscoveryClient().withHealthChecks().build(context);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -132,7 +131,7 @@ public class LoadBalancerClientConfiguration {
|
||||
@ConditionalOnProperty(value = "spring.cloud.loadbalancer.configurations", havingValue = "health-check")
|
||||
public ServiceInstanceListSupplier healthCheckDiscoveryClientServiceInstanceListSupplier(
|
||||
ConfigurableApplicationContext context) {
|
||||
return ServiceInstanceListSupplier.builder().withBlockingDiscoveryClient().withHealthChecks().withCaching()
|
||||
return ServiceInstanceListSupplier.builder().withBlockingDiscoveryClient().withHealthChecks()
|
||||
.build(context);
|
||||
}
|
||||
|
||||
|
||||
@@ -104,13 +104,10 @@ class LoadBalancerClientConfigurationTests {
|
||||
reactiveDiscoveryClientRunner.withUserConfiguration(TestConfig.class)
|
||||
.withPropertyValues("spring.cloud.loadbalancer.configurations=health-check").run(context -> {
|
||||
ServiceInstanceListSupplier supplier = context.getBean(ServiceInstanceListSupplier.class);
|
||||
then(supplier).isInstanceOf(CachingServiceInstanceListSupplier.class);
|
||||
then(supplier).isInstanceOf(HealthCheckServiceInstanceListSupplier.class);
|
||||
ServiceInstanceListSupplier delegate = ((DelegatingServiceInstanceListSupplier) supplier)
|
||||
.getDelegate();
|
||||
then(delegate).isInstanceOf(HealthCheckServiceInstanceListSupplier.class);
|
||||
ServiceInstanceListSupplier secondDelegate = ((DelegatingServiceInstanceListSupplier) delegate)
|
||||
.getDelegate();
|
||||
then(secondDelegate).isInstanceOf(DiscoveryClientServiceInstanceListSupplier.class);
|
||||
then(delegate).isInstanceOf(DiscoveryClientServiceInstanceListSupplier.class);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user