Upgrade to eureka 1.6.0

fixes gh-1345
parent ea4e5d76
......@@ -15,7 +15,7 @@
<description>Spring Cloud Netflix Dependencies</description>
<properties>
<archaius.version>0.7.4</archaius.version>
<eureka.version>1.4.11</eureka.version>
<eureka.version>1.6.0</eureka.version>
<feign.version>9.3.1</feign.version>
<hystrix.version>1.5.6</hystrix.version>
<ribbon.version>2.2.0</ribbon.version>
......
......@@ -26,6 +26,7 @@ import org.springframework.boot.test.util.EnvironmentTestUtils;
import org.springframework.cloud.commons.util.UtilAutoConfiguration;
import org.springframework.cloud.config.client.ConfigClientProperties;
import org.springframework.cloud.config.client.DiscoveryClientConfigServiceBootstrapConfiguration;
import org.springframework.cloud.netflix.eureka.CloudEurekaClient;
import org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
......@@ -99,7 +100,7 @@ public class DiscoveryClientConfigServiceAutoConfigurationTests {
@Bean
public EurekaClient eurekaClient(ApplicationInfoManager manager) {
InstanceInfo info = manager.getInfo();
EurekaClient client = Mockito.mock(EurekaClient.class);
EurekaClient client = Mockito.mock(CloudEurekaClient.class);
given(client.getInstancesByVipAddress(DEFAULT_CONFIG_SERVER, false))
.willReturn(Arrays.asList(info));
return client;
......
......@@ -188,6 +188,8 @@ public class EurekaServerConfigBean implements EurekaServerConfig, EurekaConstan
private AwsBindingStrategy bindingStrategy = AwsBindingStrategy.EIP;
private int minAvailableInstancesForPeerReplication = -1;
@Override
public boolean shouldEnableSelfPreservation() {
return this.enableSelfPreservation;
......@@ -267,4 +269,9 @@ public class EurekaServerConfigBean implements EurekaServerConfig, EurekaConstan
}
return null;
}
@Override
public int getHealthStatusMinNumberOfAvailablePeers() {
return this.minAvailableInstancesForPeerReplication;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment