Updates test to wait for results
fixes gh-1487
This commit is contained in:
@@ -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 {
|
||||
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 {
|
||||
|
||||
publisher.publishEvent(new HeartbeatEvent(this, 1L));
|
||||
|
||||
Thread.sleep(2000);
|
||||
|
||||
routes = routeLocator.getRoutes()
|
||||
.filter(route -> route.getId().startsWith("test__")).collectList()
|
||||
.block();
|
||||
|
||||
Reference in New Issue
Block a user