Bumping versions

This commit is contained in:
buildmaster
2022-06-14 19:14:52 +00:00
parent d42b2543fa
commit c297177dd8
3 changed files with 15 additions and 15 deletions

View File

@@ -20,12 +20,12 @@
</parent>
<properties>
<spring-cloud-bus.version>3.1.2</spring-cloud-bus.version>
<spring-cloud-bus.version>3.1.3-SNAPSHOT</spring-cloud-bus.version>
<spring-cloud-commons.version>3.1.4-SNAPSHOT</spring-cloud-commons.version>
<spring-cloud-config.version>3.1.4-SNAPSHOT</spring-cloud-config.version>
<spring-cloud-deployer.version>1.0.3.RELEASE</spring-cloud-deployer.version>
<spring-cloud-openfeign.version>3.1.4-SNAPSHOT</spring-cloud-openfeign.version>
<spring-cloud-stream.version>3.2.4</spring-cloud-stream.version>
<spring-cloud-stream.version>3.2.5-SNAPSHOT</spring-cloud-stream.version>
<testcontainers.version>1.15.1</testcontainers.version>
</properties>

View File

@@ -101,7 +101,7 @@ public class ConsulConfigServerBootstrapper implements BootstrapRegistryInitiali
private boolean isDiscoveryEnabled(Binder binder) {
return binder.bind(ConfigClientProperties.CONFIG_DISCOVERY_ENABLED, Boolean.class).orElse(false)
&& binder.bind(ConditionalOnConsulDiscoveryEnabled.PROPERTY, Boolean.class).orElse(true)
&& binder.bind("spring.cloud.discovery.enabled", Boolean.class).orElse(true);
&& binder.bind("spring.cloud.discovery.enabled", Boolean.class).orElse(true);
}
}

View File

@@ -70,15 +70,15 @@ public class ConsulConfigServerBootstrapperTests {
@Test
public void springCloudDiscoveryClientNotEnabledProvidesEmptyList() {
new SpringApplicationBuilder(TestConfig.class)
.properties("--server.port=0", "spring.cloud.service-registry.auto-registration.enabled=false",
"spring.cloud.config.discovery.enabled=true", "spring.cloud.discovery.enabled=false")
.addBootstrapRegistryInitializer(registry -> registry.addCloseListener(event -> {
ConfigServerInstanceProvider.Function providerFn = event.getBootstrapContext()
.get(ConfigServerInstanceProvider.Function.class);
assertThat(providerFn.apply("id"))
.as("ConfigServerInstanceProvider.Function should return empty list")
.isEqualTo(Collections.EMPTY_LIST);
})).run().close();
.properties("--server.port=0", "spring.cloud.service-registry.auto-registration.enabled=false",
"spring.cloud.config.discovery.enabled=true", "spring.cloud.discovery.enabled=false")
.addBootstrapRegistryInitializer(registry -> registry.addCloseListener(event -> {
ConfigServerInstanceProvider.Function providerFn = event.getBootstrapContext()
.get(ConfigServerInstanceProvider.Function.class);
assertThat(providerFn.apply("id"))
.as("ConfigServerInstanceProvider.Function should return empty list")
.isEqualTo(Collections.EMPTY_LIST);
})).run().close();
}
@Test
@@ -96,9 +96,9 @@ public class ConsulConfigServerBootstrapperTests {
ConfigServerInstanceProvider.Function providerFn = event.getBootstrapContext()
.get(ConfigServerInstanceProvider.Function.class);
assertThatThrownBy(() -> providerFn.apply("id")).isInstanceOf(TransportException.class)
.hasMessageContaining("org.apache.http.conn.HttpHostConnectException: Connect to localhost:8500")
.as("Should have tried to reach out to Consul to get config server instance")
.isNotNull();
.hasMessageContaining(
"org.apache.http.conn.HttpHostConnectException: Connect to localhost:8500")
.as("Should have tried to reach out to Consul to get config server instance").isNotNull();
})).run();
ConsulDiscoveryClient discoveryClient = context.getBean(ConsulDiscoveryClient.class);
assertThat(discoveryClient == bootstrapDiscoveryClient.get()).isTrue();