Browse Source

Updates test to wait for results

fixes gh-1487
pull/1489/head
Spencer Gibb 5 years ago
parent
commit
259d4bd8ad
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 6
      spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/discovery/DiscoveryClientRouteDefinitionLocatorIntegrationTests.java

6
spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/discovery/DiscoveryClientRouteDefinitionLocatorIntegrationTests.java

@ -19,7 +19,6 @@ package org.springframework.cloud.gateway.discovery; @@ -19,7 +19,6 @@ package org.springframework.cloud.gateway.discovery;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import reactor.core.publisher.Flux;
@ -57,8 +56,7 @@ public class DiscoveryClientRouteDefinitionLocatorIntegrationTests { @@ -57,8 +56,7 @@ public class DiscoveryClientRouteDefinitionLocatorIntegrationTests {
private TestDiscoveryClient discoveryClient;
@Test
@Ignore
public void newServiceAddsRoute() {
public void newServiceAddsRoute() throws Exception {
List<Route> routes = routeLocator.getRoutes()
.filter(route -> route.getId().startsWith("test__")).collectList()
.block();
@ -68,6 +66,8 @@ public class DiscoveryClientRouteDefinitionLocatorIntegrationTests { @@ -68,6 +66,8 @@ public class DiscoveryClientRouteDefinitionLocatorIntegrationTests {
publisher.publishEvent(new HeartbeatEvent(this, 1L));
Thread.sleep(2000);
routes = routeLocator.getRoutes()
.filter(route -> route.getId().startsWith("test__")).collectList()
.block();

Loading…
Cancel
Save