Bumps to build 2.2.4.BUILD-SNAPSHOT
Adds joda time dep mgmt since boot 2.3 dropped it. Updates deprecations to replacements
This commit is contained in:
8
pom.xml
8
pom.xml
@@ -14,12 +14,13 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-build</artifactId>
|
||||
<version>2.2.3.RELEASE</version>
|
||||
<version>2.2.4.BUILD-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
<!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<joda-time.version>2.10.5</joda-time.version>
|
||||
<spring-cloud-bus.version>2.2.2.BUILD-SNAPSHOT</spring-cloud-bus.version>
|
||||
<spring-cloud-commons.version>2.2.3.BUILD-SNAPSHOT</spring-cloud-commons.version>
|
||||
<spring-cloud-config.version>2.2.3.BUILD-SNAPSHOT</spring-cloud-config.version>
|
||||
@@ -171,6 +172,11 @@
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- end archaius deps -->
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>${joda-time.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-commons</artifactId>
|
||||
@@ -74,14 +78,6 @@
|
||||
<artifactId>httpcore</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
|
||||
@@ -20,7 +20,7 @@ import com.ecwid.consul.transport.TLSConfig;
|
||||
import com.ecwid.consul.v1.ConsulClient;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnEnabledEndpoint;
|
||||
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint;
|
||||
import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator;
|
||||
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
|
||||
import org.springframework.boot.autoconfigure.aop.AopAutoConfiguration;
|
||||
@@ -74,7 +74,7 @@ public class ConsulAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
@ConditionalOnEnabledEndpoint
|
||||
@ConditionalOnAvailableEndpoint
|
||||
public ConsulEndpoint consulEndpoint(ConsulClient consulClient) {
|
||||
return new ConsulEndpoint(consulClient);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.boot.SpringBootConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.test.rule.OutputCapture;
|
||||
import org.springframework.boot.test.system.OutputCaptureRule;
|
||||
import org.springframework.cloud.client.serviceregistry.AutoServiceRegistrationConfiguration;
|
||||
import org.springframework.cloud.consul.ConsulAutoConfiguration;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
@@ -45,7 +45,7 @@ public class ConsulAutoServiceRegistrationRetryTests {
|
||||
public ExpectedException exception = ExpectedException.none();
|
||||
|
||||
@Rule
|
||||
public OutputCapture output = new OutputCapture();
|
||||
public OutputCaptureRule output = new OutputCaptureRule();
|
||||
|
||||
@Test
|
||||
public void testRetry() {
|
||||
|
||||
@@ -88,11 +88,14 @@ public class ConsulServiceRegistryCheckTtlTests {
|
||||
.getDeclaredField("serviceHeartbeats");
|
||||
serviceHeartbeatsField.setAccessible(true);
|
||||
Map serviceHeartbeats = (Map) serviceHeartbeatsField.get(this.ttlScheduler);
|
||||
assertThat(serviceHeartbeats.keySet().contains(this.registration.getInstanceId()))
|
||||
.as("Service with heartbeat check not registered in TTL scheduler")
|
||||
.isTrue();
|
||||
assertThat(serviceHeartbeats.keySet().contains(httpRegistration.getInstanceId()))
|
||||
.as("Service with HTTP check registered in TTL scheduler").isFalse();
|
||||
assertThat(serviceHeartbeats.keySet()
|
||||
.contains(this.registration.getInstanceId())).as(
|
||||
"Service with heartbeat check not registered in TTL scheduler")
|
||||
.isTrue();
|
||||
assertThat(
|
||||
serviceHeartbeats.keySet().contains(httpRegistration.getInstanceId()))
|
||||
.as("Service with HTTP check registered in TTL scheduler")
|
||||
.isFalse();
|
||||
}
|
||||
finally {
|
||||
this.consulServiceRegistry.deregister(httpRegistration);
|
||||
|
||||
Reference in New Issue
Block a user