From 2619a0d68cae42f35b65d2fec717d216b2c4559a Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Wed, 1 Nov 2017 13:48:53 -0400 Subject: [PATCH] Update tests for edgware --- .../ZookeeperDiscoveryAutoRegistrationFalseTests.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryAutoRegistrationFalseTests.java b/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryAutoRegistrationFalseTests.java index bd1afe93..d7719f16 100644 --- a/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryAutoRegistrationFalseTests.java +++ b/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryAutoRegistrationFalseTests.java @@ -27,6 +27,8 @@ 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.client.discovery.simple.SimpleDiscoveryProperties; import org.springframework.cloud.zookeeper.discovery.test.CommonTestConfig; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -52,10 +54,10 @@ public class ZookeeperDiscoveryAutoRegistrationFalseTests { @Autowired DiscoveryClient discoveryClient; @Value("${spring.application.name}") String springAppName; - @Test public void discovery_client_is_zookeeper() { + @Test public void discovery_client_is_composite() { //given: this.discoveryClient //expect: - then(discoveryClient).isInstanceOf(ZookeeperDiscoveryClient.class); + then(discoveryClient).isInstanceOf(CompositeDiscoveryClient.class); } @Test public void application_should_not_have_been_registered() { @@ -65,11 +67,11 @@ public class ZookeeperDiscoveryAutoRegistrationFalseTests { then(instances).isEmpty(); } - @Test public void should_not_find_local_instance() { + @Test public void should_not_find_local_zookeeper_instance() { //given ServiceInstance serviceInstance = this.discoveryClient.getLocalServiceInstance(); //expect: - then(serviceInstance).isNull(); + then(serviceInstance).isInstanceOf(SimpleDiscoveryProperties.SimpleServiceInstance.class); } @Configuration