Merge branch 'master' into 2.0.x
# Conflicts: # pom.xml # spring-cloud-zookeeper-dependencies/pom.xml
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
logging:
|
||||
level:
|
||||
org.apache.zookeeper.ClientCnxn: ERROR
|
||||
@@ -27,6 +27,7 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.cloud.client.ServiceInstance;
|
||||
import org.springframework.cloud.client.discovery.DiscoveryClient;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.client.discovery.composite.CompositeDiscoveryClient;
|
||||
import org.springframework.cloud.zookeeper.discovery.test.CommonTestConfig;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
@@ -55,7 +56,11 @@ public class ZookeeperDiscoveryAutoRegistrationFalseTests {
|
||||
@Test public void discovery_client_is_zookeeper() {
|
||||
//given: this.discoveryClient
|
||||
//expect:
|
||||
then(discoveryClient).isInstanceOf(ZookeeperDiscoveryClient.class);
|
||||
then(discoveryClient).isInstanceOf(CompositeDiscoveryClient.class);
|
||||
CompositeDiscoveryClient composite = (CompositeDiscoveryClient) discoveryClient;
|
||||
List<DiscoveryClient> discoveryClients = composite.getDiscoveryClients();
|
||||
DiscoveryClient first = discoveryClients.get(0);
|
||||
then(first).isInstanceOf(ZookeeperDiscoveryClient.class);
|
||||
}
|
||||
|
||||
@Test public void application_should_not_have_been_registered() {
|
||||
@@ -65,11 +70,11 @@ public class ZookeeperDiscoveryAutoRegistrationFalseTests {
|
||||
then(instances).isEmpty();
|
||||
}
|
||||
|
||||
@Test public void should_not_find_local_instance() {
|
||||
@Test public void should_find_local_instance() {
|
||||
//given
|
||||
ServiceInstance serviceInstance = this.discoveryClient.getLocalServiceInstance();
|
||||
//expect:
|
||||
then(serviceInstance).isNull();
|
||||
then(serviceInstance).isNotNull();
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -3,4 +3,7 @@ spring.application.name: client
|
||||
spring.cloud.zookeeper:
|
||||
dependencies:
|
||||
testInstance:
|
||||
path: /server
|
||||
path: /server
|
||||
logging:
|
||||
level:
|
||||
org.apache.zookeeper.ClientCnxn: ERROR
|
||||
@@ -24,3 +24,6 @@ spring.cloud.zookeeper:
|
||||
management:
|
||||
security:
|
||||
enabled: false
|
||||
logging:
|
||||
level:
|
||||
org.apache.zookeeper.ClientCnxn: ERROR
|
||||
|
||||
@@ -4,3 +4,6 @@ spring.cloud.zookeeper:
|
||||
someAlias:
|
||||
path: testInstance
|
||||
loadBalancerType: STICKY
|
||||
logging:
|
||||
level:
|
||||
org.apache.zookeeper.ClientCnxn: ERROR
|
||||
|
||||
@@ -3,3 +3,6 @@ spring.application.name: me
|
||||
management:
|
||||
security:
|
||||
enabled: false
|
||||
logging:
|
||||
level:
|
||||
org.apache.zookeeper.ClientCnxn: ERROR
|
||||
|
||||
@@ -9,3 +9,6 @@ spring:
|
||||
management:
|
||||
security:
|
||||
enabled: false
|
||||
logging:
|
||||
level:
|
||||
org.apache.zookeeper.ClientCnxn: ERROR
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
server.port: 0
|
||||
spring.application.name: server
|
||||
spring.application.name: server
|
||||
logging:
|
||||
level:
|
||||
org.apache.zookeeper.ClientCnxn: ERROR
|
||||
@@ -18,3 +18,6 @@ spring.cloud.zookeeper:
|
||||
contentTypeTemplate: application/vnd.newsletter.$version+json2
|
||||
version: v1
|
||||
required: false
|
||||
logging:
|
||||
level:
|
||||
org.apache.zookeeper.ClientCnxn: ERROR
|
||||
@@ -1 +1,4 @@
|
||||
testInstance.ribbon.ServerListRefreshInterval: 100
|
||||
testInstance.ribbon.ServerListRefreshInterval: 100
|
||||
logging:
|
||||
level:
|
||||
org.apache.zookeeper.ClientCnxn: ERROR
|
||||
@@ -10,7 +10,7 @@ endpoints:
|
||||
sensitive: false
|
||||
|
||||
logging.level:
|
||||
org.apache.zookeeper.ClientCnxn: WARN
|
||||
org.apache.zookeeper.ClientCnxn: ERROR
|
||||
|
||||
management:
|
||||
security:
|
||||
|
||||
Reference in New Issue
Block a user