Ensure there is a NoopDiscoveryClient if @EnableZuulProxy

See https://github.com/spring-cloud/spring-cloud-commons/issues/80
This commit is contained in:
Dave Syer
2016-01-18 17:36:54 +00:00
parent 1b244f3451
commit c1bcca86ab
2 changed files with 2 additions and 6 deletions

View File

@@ -29,10 +29,6 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zuul</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>

View File

@@ -11,7 +11,7 @@ import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.boot.test.TestRestTemplate;
import org.springframework.boot.test.WebIntegrationTest;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.cloud.netflix.eureka.EurekaDiscoveryClient;
import org.springframework.cloud.client.discovery.noop.NoopDiscoveryClient;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.test.annotation.DirtiesContext;
@@ -53,6 +53,6 @@ public class ZuulProxyApplicationTests {
@Test
public void discoveryClientIsNoop() {
assertTrue("discoveryClient is wrong type", this.discoveryClient instanceof EurekaDiscoveryClient);
assertTrue("discoveryClient is wrong type", this.discoveryClient instanceof NoopDiscoveryClient);
}
}